<!--钢筋保护层检测---钢筋保护层检测-1---编辑-->
<template>
  <div class="department">
    <!-- 右侧 -->
    <div class="department_right">
      <!-- 顶部导航栏 -->
      <div class="mechanism_nav">
        <!-- 左侧 -->
        <div class="mechanism_nav_left">
          <el-radio-group
            v-model="radio"
            size="small"
            @change="modelType($event)"
          >
            <el-radio-button label="待办"></el-radio-button>
            <el-radio-button label="已办"></el-radio-button>
          </el-radio-group>
        </div>
        <!-- 顶部按钮 -->
        <div class="print">
          <div class="printTable">
            <el-button
              type="info"
              icon="el-icon-circle-plus-outline"
              size="small"
              @click="edit(0)"
              v-if="btnSee && yj_addRecord == true"
              >按检测记录新增</el-button
            >
            <el-button
              type="info"
              icon="el-icon-circle-plus-outline"
              size="small"
              v-if="btnSee && yj_addProject == true"
              @click="engineering()"
            >
              选工程划分新增</el-button
            >
            <el-button
              type="primary"
              icon="el-icon-edit"
              size="small"
              v-if="btnSee && yj_edit == true"
              @click="edit(1)"
            >
              编辑</el-button
            >
            <el-button
              type="primary"
              icon="el-icon-circle-check"
              size="small"
              v-if="btnSee && yj_submit == true"
              @click="SubmitText(fId)"
              >提交
            </el-button>
            <el-button
              type="primary"
              icon="el-icon-delete"
              size="small"
              v-if="btnSee && yj_delete == true"
              @click="rowDelete(fId)"
              >删除
            </el-button>
          </div>
        </div>
      </div>
      <!-- 表格 -->
      <div class="text_table">
        <el-table
          ref="multipleTableA"
          v-loading="loading"
          element-loading-text="拼命加载中"
          element-loading-spinner="el-icon-loading"
          element-loading-background="rgba(0, 0, 0, 0.2)"
          @row-click="getRowInfo"
          :data="tableData"
          style="width: 100%"
          :height="navigatepageNums > 1 ? 'calc(100% - 50px)' : '100%'"
          stripe
          border
          highlight-current-row
          @current-change="rowChange"
        >
          <el-table-column
            fixed
            type="index"
            label="序号"
            width="50"
            align="center"
          >
          </el-table-column>
          <el-table-column prop="fProjectname" label="建设项目简称" width="180">
            <!-- 超出鼠标滑过显示 -->
            <template slot-scope="scope">
              <div class="lineBoxhidden">
                <a href="javascript:;" :title="scope.row.fProjectname">{{
                  scope.row.fProjectname
                }}</a>
              </div>
            </template>
          </el-table-column>
          <el-table-column prop="fChecktype" label="检测类型" width="150">
            <template slot-scope="scope">
              <div class="lineBoxhidden">
                <a href="javascript:;" :title="scope.row.fChecktype">{{
                  scope.row.fChecktype
                }}</a>
              </div>
            </template>
          </el-table-column>

          <el-table-column
            prop="fCheckcompanyname"
            label="检测单位"
            width="150"
          >
            <template slot-scope="scope">
              <div class="lineBoxhidden">
                <a href="javascript:;" :title="scope.row.fCheckcompanyname">{{
                  scope.row.fCheckcompanyname
                }}</a>
              </div>
            </template>
          </el-table-column>

          <el-table-column prop="fClientname" label="施工/委托单位" width="120">
            <template slot-scope="scope">
              <div class="lineBoxhidden">
                <a href="javascript:;" :title="scope.row.fClientname">{{
                  scope.row.fClientname
                }}</a>
              </div>
            </template>
          </el-table-column>
          <el-table-column
            prop="fReportnumber"
            label="报告编号"
            width="180"
            align="center"
          >
            <template slot-scope="scope">
              <el-button
                @click="openDialog(scope.row, 3)"
                @cell-dblclick="openDialog"
                type="text"
                size="small"
                style="padding: 0 !important; margin: 0"
              >
                {{ scope.row.fReportnumber }}
              </el-button>
            </template>
          </el-table-column>
          <el-table-column
            prop="fReportdates"
            label="报告日期"
            width="120"
            align="center"
          >
            <template slot-scope="scope">
              <div class="lineBoxhidden">
                <a href="javascript:;" :title="scope.row.fReportdates">{{
                  scope.row.fReportdates
                }}</a>
              </div>
            </template>
          </el-table-column>
          <el-table-column
            prop="fSamplenumber"
            label="样品编号"
            width="180"
            align="center"
          >
            <template slot-scope="scope">
              <div class="lineBoxhidden">
                <a href="javascript:;" :title="scope.row.fSamplenumber">{{
                  scope.row.fSamplenumber
                }}</a>
              </div>
            </template>
          </el-table-column>
          <el-table-column
            prop="fRecordnumber"
            label="记录编号"
            width="180"
            align="center"
          >
            <template slot-scope="scope">
              <div class="lineBoxhidden">
                <a href="javascript:;" :title="scope.row.fRecordnumber">{{
                  scope.row.fRecordnumber
                }}</a>
              </div>
            </template>
          </el-table-column>
          <el-table-column
            prop="fProjectpartandapp"
            label="工程部位/用途"
            width="200"
          >
            <template slot-scope="scope">
              <div class="lineBoxhidden">
                <a href="javascript:;" :title="scope.row.fProjectpartandapp">{{
                  scope.row.fProjectpartandapp
                }}</a>
              </div>
            </template>
          </el-table-column>
          <el-table-column
            prop="fCheckdates"
            label="试验检测日期"
            width="100"
            align="center"
          >
            <template slot-scope="scope">
              <div class="lineBoxhidden">
                <a href="javascript:;" :title="scope.row.fCheckdates">{{
                  scope.row.fCheckdates
                }}</a>
              </div>
            </template>
          </el-table-column>
          <el-table-column
            prop="fCheckreference"
            label="检测依据"
            width="120"
            align="center"
          >
            <template slot-scope="scope">
              <div class="lineBoxhidden">
                <a href="javascript:;" :title="scope.row.fCheckreference">{{
                  scope.row.fCheckreference
                }}</a>
              </div>
            </template>
          </el-table-column>
          <el-table-column
            prop="fDecidereference"
            label="判定依据"
            width="120"
            align="center"
          >
            <template slot-scope="scope">
              <div class="lineBoxhidden">
                <a href="javascript:;" :title="scope.row.fDecidereference">{{
                  scope.row.fDecidereference
                }}</a>
              </div>
            </template>
          </el-table-column>
          <el-table-column
            prop="fCreateusername"
            label="记录人"
            width="80"
            align="center"
          >
          </el-table-column>
          <el-table-column
            prop="fStatus"
            label="信息状态"
            width="100"
            align="center"
          >
          </el-table-column>
          <template slot="empty">
            <img
              style="width: 285px; height: 208px"
              src="@/assets/img/undata.png"
              alt=""
            />
            <div class="pageFlagText">暂时没有数据哦！</div>
          </template>
        </el-table>
        <div class="block" v-if="navigatepageNums > 1">
          <div class="paginationInfo">
            检索到{{ queryCriteriaData.total }} 条记录 | 显示第
            <span v-if="getList.page == 1">{{ getList.page }}</span
            ><span v-else>{{ 20 * (getList.page - 1) }}</span> -
            <!-- {{ 20 * getList.page }} 条记录 -->
            <span v-if="queryCriteriaData.pages == queryCriteriaData.lastPage">
              {{ queryCriteriaData.total }}</span
            >
            <span v-else> {{ 20 * getList.page }} </span>
            条记录
          </div>
          <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="getList.page"
            :page-size="getList.pageSize"
            layout="prev, pager, next, jumper"
            :total="queryCriteriaData.total"
          >
          </el-pagination>
        </div>
      </div>

      <!-- 按检测记录新增/编辑 -->
      <div class="steelSheet Control-1 big_dialog">
        <el-dialog
          :title="dialogText"
          v-dialogDrag
          :visible.sync="dialogTableVisible"
          v-loading="loadingDialog"
          element-loading-text="拼命加载中"
          element-loading-spinner="el-icon-loading"
          element-loading-background="rgba(0, 0, 0, 0.2)"
        >
          <el-menu
            :default-active="activeIndex"
            class="el-menu-demo"
            mode="horizontal"
            @select="handleSelect"
          >
            <el-menu-item index="1">钢筋保护层厚度试验检测记录表</el-menu-item>
            <el-menu-item index="2">钢筋保护层厚度试验检测报告</el-menu-item>
          </el-menu>
          <!-- 钢筋保护层厚度试验检测记录表 -->
          <div
            v-show="activeIndex == '1'"
            class="dialogBody common"
            :style="{ height: dialogHeights }"
          >
            <header>钢筋保护层厚度试验检测记录表</header>
            <!-- 检测类型 -->
            <div class="top_box top_1" style="border-bottom: 1px solid #ccc">
              <div class="bottom1_1" style="background: #f5f7fa">
                检测类型
                <i
                  class="iconfont icon-must-fill2"
                  style="color: red; width: 5px"
                ></i>
              </div>
              <div class="bottom1_2" ref="fChecktype">
                <el-select
                  v-model="formData.fChecktype"
                  placeholder="请选择"
                  @change="changeChecktype($event, 'fChecktype')"
                >
                  <el-option
                    v-for="(v, i) in Checktype"
                    :key="i"
                    :label="v.fItemName"
                    :value="v.fItemName"
                  >
                  </el-option>
                </el-select>
              </div>
            </div>

            <div class="title">
              <div class="title_Name title_record">
                <div class="title_input_text">检测单位名称：</div>
                <div
                  class="title_input_con"
                  v-text="formData.fCheckcompanyfullname"
                ></div>
              </div>
              <div class="title_input">
                <div class="title_input_text">记录编号：</div>
                <div
                  class="title_input_con"
                  v-text="formData.fRecordnumber"
                ></div>
              </div>
            </div>
            <!-- 工程名称 -->
            <div class="top_box top_1">
              <div class="bottom1_1" style="background: #f5f7fa">
                工程名称
                <i
                  class="iconfont icon-must-fill2"
                  style="color: red; width: 5px"
                ></i>
              </div>
              <div class="bottom1_2">
                <el-input
                  v-model="formData.fProjectfullname"
                  placeholder="/"
                ></el-input>
              </div>
            </div>
            <!-- 工程部位/用途 -->
            <div class="top_box top_1">
              <div class="bottom1_1">
                工程部位/用途
                <i
                  class="iconfont icon-must-fill2"
                  style="color: red; width: 5px"
                ></i>
              </div>
              <div
                class="bottom1_2"
                ref="fProjectpartandapp"
                @click="changeProject('fProjectpartandapp')"
              >
                <el-input
                  v-model="formData.fProjectpartandapp"
                  placeholder="/"
                ></el-input>
              </div>
            </div>
            <!-- 样品信息 -->
            <div class="top_box top_1">
              <div class="bottom1_1">
                样品信息
                <i
                  class="iconfont icon-must-fill2"
                  style="color: red; width: 5px"
                ></i>
              </div>
              <div
                class="bottom1_2"
                @click="sampleDetails('sample')"
                ref="sample"
                v-text="sample"
              ></div>
            </div>
            <!-- 试验检测日期 -->
            <div class="top_box top_1">
              <div class="top_4">
                <div class="bottom1_1">
                  试验检测日期
                  <i
                    class="iconfont icon-must-fill2"
                    style="color: red; width: 5px"
                  ></i>
                </div>
                <div class="bottom1_2">
                  <el-date-picker
                    v-model="formData.fCheckdates"
                    type="date"
                    format="yyyy 年 MM 月 dd 日"
                    value-format="yyyy-MM-dd"
                    placeholder="选择日期"
                  >
                  </el-date-picker>
                </div>
              </div>
              <div class="top_4">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  试验条件
                  <i
                    class="iconfont icon-must-fill2"
                    style="color: red; width: 5px"
                  ></i>
                </div>
                <div class="bottom1_2" ref="fCheckenvironment">
                  <el-input
                    v-model="formData.fCheckenvironment"
                    placeholder="/"
                  >
                  </el-input>
                </div>
              </div>
            </div>
            <!-- 检测依据 -->
            <div class="top_box top_1">
              <div class="top_4">
                <div class="bottom1_1">
                  检测依据
                  <i
                    class="iconfont icon-must-fill2"
                    style="color: red; width: 5px"
                  ></i>
                </div>
                <div class="bottom1_2" ref="fCheckreference">
                  <el-select
                    placeholder="/"
                    v-model="formData.fCheckreference"
                    @change="function (item) {
                        return TestnoteSelectId(item);
                      }
                    "
                  >
                    <el-option
                      v-for="(item, index) of TestnoteData"
                      :key="index"
                      :label="item.fItemname"
                      :value="item"
                    >
                    </el-option>
                  </el-select>
                </div>
              </div>
              <div class="top_4">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  判定依据
                  <i
                    class="iconfont icon-must-fill2"
                    style="color: red; width: 5px"
                  ></i>
                </div>

                <div class="bottom1_2" ref="fDecidereference">
                  <el-select
                    placeholder="/"
                    v-model="formData.fDecidereference"
                    @change="function (item) {
                        return JudgetypeSelectId(item);
                      }
                    "
                  >
                    <el-option
                      v-for="(item, index) of JudgetypeData"
                      :key="index"
                      :label="item.fItemname"
                      :value="item"
                    >
                    </el-option>
                  </el-select>
                </div>
              </div>
            </div>
            <!-- 主要仪器设备名称及编号 -->
            <div class="top_box top_1 top_2">
              <div class="bottom1_1" style="position: relative">
                主要仪器设备<br />名称及编号
                <i
                  class="iconfont icon-must-fill2"
                  style="
                    color: red;
                    width: 5px;
                    position: absolute;
                    top: 10px;
                    right: 10px;
                  "
                ></i>
              </div>
              <div class="bottom1_2" ref="fEquipmentname">
                <el-input v-if="formData.fCreatedate!=null&&formData.fId!=''" disabled v-model="formData.fMajorequipnameandnumber" placeholder="/" class="center_text"></el-input>
                <el-select
                  placeholder="/"
                  v-model="fEquipmentname"
                  multiple
                  value-key="fId"
                  @change="selectEquipmen()"
                  v-else
                >
                  <el-option
                    v-for="(item, index) in tableData1"
                    :label="`${item.fEqptname}/${item.fEqptno}`"
                    :value="item"
                    :key="index"
                  >
                  </el-option>
                </el-select>
                <!-- <el-input
                  v-else
                  v-model="formData.fMajorequipnameandnumber"
                  placeholder="/"
                  disabled
                ></el-input> -->
              </div>
            </div>
            <!-- 钢筋工称直径 -->
            <div class="top_box top_1">
              <div class="top_4 top_3">
                <div class="bottom1_1">
                  钢筋公称直径
                  <i
                    class="iconfont icon-must-fill2"
                    style="color: red; width: 5px"
                  ></i>
                </div>
                <div class="bottom1_2" ref="fDiameter">
                  <el-input
                    @input="DiameterText('fDiameter')"
                    v-model="formData.fDiameter"
                    placeholder="/"
                  ></el-input>
                </div>
              </div>
              <div class="top_4 top_3">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  修正值
                  <i
                    class="iconfont icon-must-fill2"
                    style="color: red; width: 5px"
                  ></i>
                </div>
                <div class="bottom1_2" ref="fCc">
                  <el-input
                    v-model="formData.fCc"
                    placeholder="/"
                    @input="CcText('fCc')"
                  ></el-input>
                </div>
              </div>
            </div>
            <!-- 报告编号 -->
            <div class="top_box top_1">
              <div class="top_4 top_3">
                <div class="bottom1_1">
                  报告编号
                  <i
                    class="iconfont icon-must-fill2"
                    style="color: red; width: 5px"
                  ></i>
                </div>
                <div class="bottom1_2" v-text="formData.fReportnumber"></div>
              </div>
              <div class="top_4 top_3">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  报告日期
                  <i
                    class="iconfont icon-must-fill2"
                    style="color: red; width: 5px"
                  ></i>
                </div>
                <div class="bottom1_2">
                  <el-date-picker
                    v-model="formData.fReportdates"
                    type="date"
                    placeholder="选择日期"
                    format="yyyy 年 MM 月 dd 日"
                    value-format="yyyy-MM-dd"
                  >
                  </el-date-picker>
                </div>
              </div>
            </div>
            <!-- 构件名称 -->
            <div class="top_box top_1">
              <div class="top_4 top_3">
                <div class="bottom1_1">
                  构件名称
                  <i
                    class="iconfont icon-must-fill2"
                    style="color: red; width: 5px"
                  ></i>
                </div>
                <div class="bottom1_2" ref="fComponentname">
                  <el-input
                    v-model="formData.fComponentname"
                    @input="Componentname('fComponentname')"
                    placeholder="/"
                  >
                  </el-input>
                </div>
              </div>
              <div class="top_4 top_3">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  保护层厚度设计值Dnd(mm)
                  <i
                    class="iconfont icon-must-fill2"
                    style="color: red; width: 1px"
                  ></i>
                </div>
                <div class="bottom1_2" ref="fDnd">
                  <el-input
                    v-model="formData.fDnd"
                    placeholder="/"
                    @input="StandardvalueText('fDnd')"
                  ></el-input>
                </div>
              </div>
            </div>
            <!-- 垫块厚度C -->
            <div class="top_box top_1">
              <div class="top_4 top_3">
                <div class="bottom1_1">
                  垫块厚度C(mm)
                  <i
                    class="iconfont icon-must-fill2"
                    style="color: red; width: 5px"
                  ></i>
                </div>
                <div class="bottom1_2" ref="fCo">
                  <el-input
                    v-model="formData.fCo"
                    placeholder="/"
                    @input="CoText('fCo')"
                  ></el-input>
                </div>
              </div>
              <div class="top_4 top_3">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  规定值或允许偏差(mm)
                  <i
                    class="iconfont icon-must-fill2"
                    style="color: red; width: 5px"
                  ></i>
                </div>
                <div class="bottom1_2" v-text="formData.fStandardvalue"></div>
              </div>
            </div>
            <!-- 钢筋保护层厚度判定系数 -->
            <div class="top_box top_1 top_5">
              <div class="bottom1_1">钢筋保护层厚度判定系数</div>

              <div
                class="bottom1_2"
                v-text="formData.fThicknessdecidecoefficient"
              ></div>
            </div>
            <!-- 表格 -->
            <div class="table_recordSheet">
              <!-- 左侧数据1-20 -->
              <div
                class="recordSheet"
                style="width: 50%; box-sizing: border-box"
              >
                <el-table style="width: 100%; box-sizing: border-box">
                  <el-table-column label="测点编号" width="47.5">
                  </el-table-column>
                  <el-table-column label="钢筋公称直径 (mm)" width="69.75">
                  </el-table-column>
                  <el-table-column label="保护层厚度检测值(mm)">
                    <el-table-column label="第一次检测值" width="70.75">
                    </el-table-column>
                    <el-table-column label="第二次检测值" width="70.75">
                    </el-table-column>
                    <el-table-column label="修正值" width="69.75">
                    </el-table-column>
                    <el-table-column label="平均检测值" width="70.75">
                    </el-table-column>
                  </el-table-column>
                  <el-table-column label="偏差值(mm)" width="69.75">
                  </el-table-column>
                </el-table>
                <div
                  class="recordSheet_box"
                  v-for="(v, i) in recordData"
                  :key="i"
                >
                  <div class="recordSheet_box_1 row1_1">
                    <el-input
                      v-model="v.fCheckpointnumber"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_2 row1_2">
                    <el-input
                      v-model="v.fDiameter"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_3 row1_3">
                    <el-input
                      v-model="v.fFirstcheckvalue"
                      placeholder="/"
                      @input="inputCheckpointnumber(1, 1, $event, i)"
                      class="center_text"
                      :disabled="seeNum"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_3 row1_4">
                    <el-input
                      v-model="v.fSecondcheckvalue"
                      placeholder="/"
                      @input="inputCheckpointnumber(2, 1, $event, i)"
                      class="center_text"
                      :disabled="seeNum"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_2 row1_5">
                    <el-input
                      v-model="v.fCc"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_3 row1_6">
                    <el-input
                      v-model="v.fAvgvalue"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_4 row1_7" style="border: none">
                    <el-input
                      v-model="v.fSdvalue"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                </div>
              </div>
              <!-- 右侧数据21-40 -->
              <div
                class="recordSheet"
                style="
                  width: 50%;
                  box-sizing: border-box;
                  border-right: 1px solid #ccc;
                "
              >
                <el-table style="width: 100%; box-sizing: border-box">
                  <el-table-column label="测点编号" width="47.5">
                  </el-table-column>
                  <el-table-column label="钢筋公称直径 (mm)" width="69.75">
                  </el-table-column>

                  <el-table-column label="保护层厚度检测值(mm)">
                    <el-table-column label="第一次检测值" width="70.75">
                    </el-table-column>
                    <el-table-column label="第二次检测值" width="70.75">
                    </el-table-column>
                    <el-table-column label="修正值" width="69.75">
                    </el-table-column>
                    <el-table-column label="平均检测值" width="70.75">
                    </el-table-column>
                  </el-table-column>
                  <el-table-column label="偏差值(mm)" width="69.75">
                  </el-table-column>
                </el-table>
                <div
                  class="recordSheet_box"
                  v-for="(v, i) in recordData1"
                  :key="i"
                >
                  <div class="recordSheet_box_1 row1_1">
                    <el-input
                      v-model="v.fCheckpointnumber"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_2 row1_2">
                    <el-input
                      v-model="v.fDiameter"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_3 row1_3">
                    <el-input
                      @input="inputCheckpointnumber(1, 2, $event, i)"
                      v-model="v.fFirstcheckvalue"
                      placeholder="/"
                      class="center_text"
                      :disabled="seeNum"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_3 row1_4">
                    <el-input
                      v-model="v.fSecondcheckvalue"
                      @input="inputCheckpointnumber(2, 2, $event, i)"
                      placeholder="/"
                      class="center_text"
                      :disabled="seeNum"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_2 row1_5">
                    <el-input
                      v-model="v.fCc"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_3 row1_6">
                    <el-input
                      v-model="v.fAvgvalue"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_4 row1_7" style="border: none">
                    <el-input
                      v-model="v.fSdvalue"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                </div>
              </div>
            </div>
            <!--底部 第一行 -->
            <div class="bottom_box">
              <div class="bottom1_1">保护层厚度检测点数</div>
              <div class="bottom1_2" v-text="formData.fCheckpointcount"></div>
              <div class="bottom1_3" style="border-left: #ccc 1px solid">
                合格点数
              </div>
              <div
                class="bottom1_4"
                v-text="formData.fCheckpointqualifiedcount"
              ></div>
              <div class="bottom1_5">合格率(%)</div>
              <div
                class="bottom1_6"
                v-text="formData.fCheckpointqualifiedrate"
              ></div>
            </div>
            <!--底部 第二行 -->
            <div class="bottom_box">
              <div class="bottom1_1">保护层厚度平均值Dn(mm)</div>
              <div
                class="bottom1_2"
                v-text="formData.fCheckpointavgthickness"
              ></div>
              <div class="bottom1_3" style="border-left: #ccc 1px solid">
                标准偏差(mm)
              </div>
              <div class="bottom1_4" v-text="formData.fSd"></div>
              <div class="bottom1_5">保护层厚度特征值(mm)</div>
              <div class="bottom1_6" v-text="formData.fDne"></div>
            </div>
            <!-- 检测部位示意图 -->
            <div class="bottom_box box2">
              <div class="bottom1_1">检测部位示意图</div>
              <div class="bottom1_2">
                <el-input
                  v-show="false"
                  v-model="formData.fCheckpartimage"
                ></el-input>
                <div
                  ref="fPhotofilelist"
                  style="
                    height: 25px;
                    line-height: 25px;
                    width: 100%;
                    display: flex;
                    border-radius: 5px;
                    margin: 8px 0 2px 0;
                  "
                >
                  <div
                    v-for="(v, i) in fPhotofilelist"
                    :key="i"
                    style="margin: 2px 3px; height: 87%"
                    @click="openPdfs(v)"
                  >
                    <img
                      style="max-width: 100%; max-height: 100%"
                      src="@/assets/img/pdf.png"
                    />
                  </div>
                </div>

                <el-button
                  v-show="!dis"
                  type="info"
                  icon="el-icon-search"
                  size="small"
                  @click="operation()"
                  style="margin: 8px 5px 2px 5px"
                  >操作</el-button
                >
              </div>
            </div>
            <!-- 附加声明 -->
            <div class="bottom_box box2">
              <div class="bottom1_1">附加声明</div>
              <div class="bottom1_2">
                <el-input v-model="formData.fAddcomments"></el-input>
              </div>
            </div>
          </div>
          <!-- 钢筋保护层厚度试验检测报告 -->
          <div
            v-show="activeIndex == '2'"
            class="dialogBody common reportSheet"
            :style="{ height: dialogHeights }"
          >
            <header>钢筋保护层厚度试验检测报告</header>
            <!-- 检测类型 -->
            <div
              class="top_box top_1"
              style="border-bottom: 1px solid #ccc"
              v-show="false"
            ></div>
            <!-- 头部 -->
            <div class="title">
              <div class="title_Name">
                <div class="title_input_text">检测单位名称(专用章):</div>
                <div
                  class="title_input_con"
                  v-text="formData.fCheckcompanyfullname"
                ></div>
              </div>
              <div class="title_input">
                <div class="title_input_text">报告编号：</div>
                <div
                  class="title_input_con"
                  v-text="formData.fReportnumber"
                ></div>
              </div>
            </div>
            <!-- 施工/委托单位 -->
            <div class="top_box top_1 top_2">
              <div class="top_4">
                <div class="bottom1_1" style="line-height: 40px !important">
                  施工/委托单位
                  <i
                    class="iconfont icon-must-fill2"
                    style="color: red; width: 5px"
                  ></i>
                </div>

                <div class="bottom1_2" v-text="formData.fClientfullname"></div>
              </div>
              <div class="top_4">
                <div
                  class="bottom1_1"
                  style="
                    border-left: 1px solid #ccc;
                    line-height: 40px !important;
                  "
                >
                  工程名称
                  <i
                    class="iconfont icon-must-fill2"
                    style="color: red; width: 5px"
                  ></i>
                </div>
                <div class="bottom1_2" v-text="formData.fProjectfullname"></div>
              </div>
            </div>
            <!-- 工程部位/用途 -->
            <div class="top_box top_1">
              <div class="bottom1_1">
                工程部位/用途
                <i
                  class="iconfont icon-must-fill2"
                  style="color: red; width: 5px"
                ></i>
              </div>
              <div
                class="bottom1_2"
                ref="fProjectpartandapp1"
                @click="changeProject('fProjectpartandapp1')"
                v-text="formData.fProjectpartandapp"
              ></div>
            </div>
            <!-- 样品信息 -->
            <div class="top_box top_1">
              <div class="bottom1_1">
                样品信息
                <i
                  class="iconfont icon-must-fill2"
                  style="color: red; width: 5px"
                ></i>
              </div>
              <div
                class="bottom1_2"
                ref="sample1"
                @click="sampleDetails('sample1')"
                v-text="sample"
              ></div>
            </div>
            <!-- 检测依据 -->
            <div class="top_box top_1">
              <div class="top_4">
                <div class="bottom1_1">
                  检测依据
                  <i
                    class="iconfont icon-must-fill2"
                    style="color: red; width: 5px"
                  ></i>
                </div>
                <div class="bottom1_2" ref="fCheckreference1">
                  <el-select
                    placeholder="/"
                    v-model="formData.fCheckreference"
                    @change="function (item) {
                        return TestnoteSelectId(item);
                      }
                    "
                  >
                    <el-option
                      v-for="(item, index) of TestnoteData"
                      :key="index"
                      :label="item.fItemname"
                      :value="item"
                    >
                    </el-option>
                  </el-select>
                </div>
              </div>
              <div class="top_4">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  判定依据
                  <i
                    class="iconfont icon-must-fill2"
                    style="color: red; width: 5px"
                  ></i>
                </div>

                <div class="bottom1_2" ref="fDecidereference1">
                  <el-select
                    placeholder="/"
                    v-model="formData.fDecidereference"
                    @change="function (item) {
                        return JudgetypeSelectId(item);
                      }
                    "
                  >
                    <el-option
                      v-for="(item, index) of JudgetypeData"
                      :key="index"
                      :label="item.fItemname"
                      :value="item"
                    >
                    </el-option>
                  </el-select>
                </div>
              </div>
            </div>

            <!-- 主要仪器设备名称及编号 -->
            <div class="top_box top_1 top_2">
              <div class="bottom1_1">
                主要仪器设备<br />名称及编号
                <i
                  class="iconfont icon-must-fill2"
                  style="
                    color: red;
                    width: 5px;
                    position: absolute;
                    top: 10px;
                    right: 10px;
                  "
                ></i>
              </div>
              <div class="bottom1_2" ref="fEquipmentname1">

                <el-input v-if="formData.fCreatedate!=null&&formData.fId!=''" disabled v-model="formData.fMajorequipnameandnumber" placeholder="/" class="center_text"></el-input>
                <el-select
                  placeholder="/"
                  v-model="fEquipmentname"
                  multiple
                  value-key="fId"
                  @change="selectEquipmen()"
                >
                  <el-option
                    v-for="(item, index) in tableData1"
                    :label="`${item.fEqptname}/${item.fEqptno}`"
                    :value="item"
                    :key="index"
                  >
                  </el-option>
                </el-select>
<!-- 
                <el-input
                  v-else
                  v-model="formData.fMajorequipnameandnumber"
                  placeholder="/"
                  disabled
                ></el-input> -->
              </div>
            </div>
            <!-- 龄期 -->
            <div class="top_box top_1">
              <div class="top_4">
                <div class="bottom1_1">
                  龄期(d)
                  <i
                    class="iconfont icon-must-fill2"
                    style="color: red; width: 5px"
                  ></i>
                </div>
                <div class="bottom1_2" ref="fAge">
                  <el-input
                    v-model="formData.fAge"
                    @input="Age('fAge')"
                    placeholder="/"
                  ></el-input>
                </div>
              </div>
              <div class="top_4">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  设计强度等级
                  <i
                    class="iconfont icon-must-fill2"
                    style="color: red; width: 5px"
                  ></i>
                </div>
                <div class="bottom1_2" ref="fDesignintensity">
                  <el-input
                    v-model="formData.fDesignintensity"
                    @input="Designintensity('fDesignintensity')"
                    placeholder="/"
                  >
                  </el-input>
                </div>
              </div>
            </div>
            <!-- 构件名称 -->
            <div class="top_box top_1 box2">
              <div class="top_4 top_3">
                <div class="bottom1_1">
                  构件名称
                  <i
                    class="iconfont icon-must-fill2"
                    style="color: red; width: 5px"
                  ></i>
                </div>
                <div class="bottom1_2" ref="fComponentname1">
                  <el-input
                    v-model="formData.fComponentname"
                    placeholder="/"
                    @input="Componentname('fComponentname1')"
                  >
                  </el-input>
                </div>
              </div>
              <div class="top_4 top_3">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  保护层厚度设计值Dnd(mm)
                  <i
                    class="iconfont icon-must-fill2"
                    style="color: red; width: 1px"
                  ></i>
                </div>
                <div class="bottom1_2" ref="fDnd1">
                  <el-input
                    v-model="formData.fDnd"
                    placeholder="/"
                    @input="StandardvalueText('fDnd1')"
                  ></el-input>
                </div>
              </div>
            </div>
            <!-- 垫块厚度C -->
            <div class="top_box top_1 box2">
              <div class="top_4 top_3">
                <div class="bottom1_1">
                  垫块厚度C(mm)
                  <i
                    class="iconfont icon-must-fill2"
                    style="color: red; width: 5px"
                  ></i>
                </div>
                <div class="bottom1_2" ref="fCo1">
                  <el-input
                    v-model="formData.fCo"
                    placeholder="/"
                    @input="CoText('fCo1')"
                  ></el-input>
                </div>
              </div>
              <div class="top_4 top_3">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  规定值或允许偏差(mm)
                  <i
                    class="iconfont icon-must-fill2"
                    style="color: red; width: 5px"
                  ></i>
                </div>
                <div class="bottom1_2" v-text="formData.fStandardvalue"></div>
              </div>
            </div>

            <!-- 表格 -->
            <div class="table_recordSheet table_report">
              <!-- 左侧数据1-20 -->
              <div
                class="recordSheet"
                style="width: 50%; box-sizing: border-box"
              >
                <el-table style="width: 100%; box-sizing: border-box">
                  <el-table-column prop="num" label="测点编号" width="93">
                  </el-table-column>
                  <el-table-column label="钢筋公称直径 (mm)" width="92">
                  </el-table-column>
                  <el-table-column
                    label="保护层厚度检测值 (mm)"
                    width="93"
                    style="padding: 0"
                  >
                  </el-table-column>
                  <el-table-column label="偏差值 (mm)" width="93">
                  </el-table-column>
                  <el-table-column
                    label="结果判定 "
                    width="93"
                    class-name="table_end"
                  >
                  </el-table-column>
                </el-table>
                <div
                  class="recordSheet_box"
                  v-for="(v, i) in recordData"
                  :key="i"
                  style="border-right: none"
                >
                  <div class="recordSheet_box_1 row1_1">
                    <el-input
                      v-model="v.fCheckpointnumber"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_1 row1_2">
                    <el-input
                      v-model="v.fDiameter"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_1 row1_3">
                    <el-input
                      v-model="v.fAvgvalue"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_1 row1_4">
                    <el-input
                      v-model="v.fSdvalue"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_1 row1_5" style="border: none">
                    <el-input
                      v-model="v.fResultdecide"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                </div>
              </div>
              <!-- 右侧数据21-40 -->
              <div
                class="recordSheet"
                style="
                  width: 50%;
                  box-sizing: border-box;
                  border-right: 1px solid #ccc;
                "
              >
                <el-table style="width: 100%; box-sizing: border-box">
                  <el-table-column prop="num" label="测点编号" width="93">
                  </el-table-column>
                  <el-table-column
                    prop="diameter"
                    label="钢筋公称直径 (mm)"
                    width="92"
                  >
                  </el-table-column>
                  <el-table-column
                    prop="diameter"
                    label="保护层厚度检测值 (mm)"
                    width="93"
                  >
                  </el-table-column>
                  <el-table-column
                    prop="diameter"
                    label="偏差值 (mm)"
                    width="93"
                  >
                  </el-table-column>
                  <el-table-column prop="diameter" label="结果判定 " width="93">
                  </el-table-column>
                </el-table>
                <div
                  class="recordSheet_box"
                  v-for="(v, i) in recordData1"
                  :key="i"
                  style="border-right: none"
                >
                  <div class="recordSheet_box_1 row1_1">
                    <el-input
                      v-model="v.fCheckpointnumber"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_1 row1_2">
                    <el-input
                      v-model="v.fDiameter"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_1 row1_3">
                    <el-input
                      v-model="v.fAvgvalue"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_1 row1_4">
                    <el-input
                      v-model="v.fSdvalue"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_1 row1_5" style="border: none">
                    <el-input
                      v-model="v.fResultdecide"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                </div>
              </div>
            </div>
            <!--底部 第一行 -->
            <div
              class="bottom_box"
              style="margin-top: 15px; border-top: #ccc 1px solid"
            >
              <div class="bottom1_1">保护层厚度检测点数</div>
              <div class="bottom1_2" v-text="formData.fCheckpointcount"></div>
              <div class="bottom1_3" style="border-left: #ccc 1px solid">
                合格点数
              </div>
              <div
                class="bottom1_4"
                v-text="formData.fCheckpointqualifiedcount"
              ></div>
              <div class="bottom1_5">合格率(%)</div>
              <div
                class="bottom1_6"
                v-text="formData.fCheckpointqualifiedrate"
              ></div>
            </div>
            <!--底部 第二行 -->
            <div class="bottom_box">
              <div class="bottom1_1">保护层厚度平均值Dn(mm)</div>
              <div
                class="bottom1_2"
                v-text="formData.fCheckpointavgthickness"
              ></div>
              <div class="bottom1_3" style="border-left: #ccc 1px solid">
                标准偏差(mm)
              </div>
              <div class="bottom1_4" v-text="formData.fSd"></div>
              <div class="bottom1_5">保护层厚度特征值(mm)</div>
              <div class="bottom1_6" v-text="formData.fDne"></div>
            </div>
            <!-- 保护层厚度特征值与设计值的比值Dne/Dnd -->
            <div
              class="top_box top_1 top_5 box2"
              style="border-bottom: 1px solid #ccc; border-top: none"
            >
              <div class="bottom1_1">
                保护层厚度特征值与设计值的比值Dne/Dnd
                <i
                  class="iconfont icon-must-fill2"
                  style="color: red; width: 5px"
                ></i>
              </div>

              <div class="bottom1_2" v-text="formData.fRatioofdneanddnd"></div>
            </div>
            <!-- 检测结论 -->
            <div class="bottom_box box2">
              <div class="bottom1_1">
                检测结论
                <i
                  class="iconfont icon-must-fill2"
                  style="color: red; width: 5px"
                ></i>
              </div>
              <div
                class="bottom1_2"
                ref="fCheckresult"
                style="line-height: 20px"
              >
                <el-select
                  placeholder="/"
                  v-model="formData.fCheckresult"
                  @focus="CheckresultText('fCheckresult')"
                >
                  <el-option
                    v-for="(item, index) of fCheckresultList"
                    :key="index"
                    :label="item"
                    :value="item"
                  >
                  </el-option>
                </el-select>
              </div>
            </div>
            <!-- 附加声明 -->
            <div class="bottom_box box2">
              <div class="bottom1_1">附加声明</div>
              <div class="bottom1_2">
                <el-input v-model="formData.fAddcomments"></el-input>
              </div>
            </div>
          </div>
          <div style="height: 40px">
            <div style="position: absolute; right: 5px; bottom: 0">
              <el-button type="primary" @click="submitForm()">保存</el-button>
              <el-button type="warning" @click="resetForm()">关闭</el-button>
            </div>
          </div>
        </el-dialog>
      </div>
      <!-- 查看 -->
      <div class="steelSheet Control-1 big_dialog">
        <el-dialog
          title="查看"
          v-dialogDrag
          :visible.sync="dialogTableVisibleSee"
          v-loading="loadingDialogSee"
          element-loading-text="拼命加载中"
          element-loading-spinner="el-icon-loading"
          element-loading-background="rgba(0, 0, 0, 0.2)"
        >
          <el-menu
            :default-active="activeIndex"
            class="el-menu-demo"
            mode="horizontal"
            @select="handleSelect"
          >
            <el-menu-item index="1">钢筋保护层厚度试验检测记录表</el-menu-item>
            <el-menu-item index="2">钢筋保护层厚度试验检测报告</el-menu-item>
          </el-menu>
          <div
            v-if="activeIndex == '1'"
            class="dialogBody common"
            :style="{ height: dialogHeights }"
          >
            <header>
              钢筋保护层厚度试验检测记录表
              <div class="printTable">
                <el-button
                  type="primary"
                  icon="el-icon-printer"
                  size="small"
                  @click="Print(1)"
                  >打印表格
                </el-button>
              </div>
            </header>
            <!-- 检测类型 -->
            <div class="top_box top_1" style="border-bottom: 1px solid #ccc">
              <div class="bottom1_1" style="background: #f5f7fa">
                检测类型：
              </div>
              <div class="bottom1_2" v-text="formData.fChecktype"></div>
            </div>
            <!-- 头部 -->
            <div class="title">
              <div class="title_Name title_record">
                <div class="title_input_text">检测单位名称：</div>
                <div
                  class="title_input_con"
                  v-text="formData.fCheckcompanyfullname"
                ></div>
              </div>
              <div class="title_input">
                <div class="title_input_text">记录编号：</div>
                <div
                  class="title_input_con"
                  v-text="formData.fRecordnumber"
                ></div>
              </div>
            </div>
            <!-- 工程名称 -->
            <div class="top_box top_1">
              <div class="bottom1_1" style="background: #f5f7fa">工程名称</div>
              <div class="bottom1_2" v-text="formData.fProjectfullname"></div>
            </div>
            <!-- 工程部位/用途 -->
            <div class="top_box top_1">
              <div class="bottom1_1">工程部位/用途</div>
              <div class="bottom1_2" v-text="formData.fProjectpartandapp"></div>
            </div>
            <!-- 样品信息 -->
            <div class="top_box top_1">
              <div class="bottom1_1">样品信息</div>
              <div class="bottom1_2" v-text="sample"></div>
            </div>
            <!-- 试验检测日期 -->
            <div class="top_box top_1">
              <div class="top_4">
                <div class="bottom1_1">试验检测日期</div>
                <div class="bottom1_2" v-text="formData.fCheckdates"></div>
              </div>
              <div class="top_4">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  试验条件
                </div>
                <div
                  class="bottom1_2"
                  ref="fCheckenvironment"
                  v-text="formData.fCheckenvironment"
                ></div>
              </div>
            </div>
            <!-- 检测依据 -->
            <div class="top_box top_1">
              <div class="top_4">
                <div class="bottom1_1">检测依据</div>
                <div class="bottom1_2" v-text="formData.fCheckreference"></div>
              </div>
              <div class="top_4">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  判定依据
                </div>

                <div class="bottom1_2" v-text="formData.fDecidereference"></div>
              </div>
            </div>
            <!-- 主要仪器设备名称及编号 -->
            <div class="top_box top_1 top_2">
              <div class="bottom1_1">主要仪器设备<br />名称及编号</div>
              <div
                class="bottom1_2"
                v-text="formData.fMajorequipnameandnumber"
              ></div>
            </div>
            <!-- 钢筋工称直径 -->
            <div class="top_box top_1">
              <div class="top_4 top_3">
                <div class="bottom1_1">钢筋公称直径</div>
                <div class="bottom1_2" v-text="formData.fDiameter"></div>
              </div>
              <div class="top_4 top_3">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  修正值
                </div>
                <div class="bottom1_2" v-text="formData.fCc"></div>
              </div>
            </div>
            <!-- 报告编号 -->
            <div class="top_box top_1">
              <div class="top_4 top_3">
                <div class="bottom1_1">报告编号</div>
                <div class="bottom1_2" v-text="formData.fReportnumber"></div>
              </div>
              <div class="top_4 top_3">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  报告日期
                </div>
                <div class="bottom1_2" v-text="formData.fReportdates"></div>
              </div>
            </div>
            <!-- 构件名称 -->
            <div class="top_box top_1">
              <div class="top_4 top_3">
                <div class="bottom1_1">构件名称</div>
                <div class="bottom1_2" v-text="formData.fComponentname"></div>
              </div>
              <div class="top_4 top_3">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  钢筋保护层厚度设计值Dnd(mm)
                </div>
                <div class="bottom1_2" v-text="formData.fDnd"></div>
              </div>
            </div>
            <!-- 垫块厚度C -->
            <div class="top_box top_1">
              <div class="top_4 top_3">
                <div class="bottom1_1">垫块厚度C(mm)</div>
                <div class="bottom1_2" v-text="formData.fCo"></div>
              </div>
              <div class="top_4 top_3">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  规定值或允许偏差(mm)
                </div>
                <div class="bottom1_2" v-text="formData.fStandardvalue"></div>
              </div>
            </div>
            <!-- 钢筋保护层厚度判定系数 -->
            <div class="top_box top_1 top_5">
              <div class="bottom1_1">钢筋保护层厚度判定系数</div>

              <div
                class="bottom1_2"
                v-text="formData.fThicknessdecidecoefficient"
              ></div>
            </div>
            <!-- 表格 -->
            <div class="table_recordSheet">
              <!-- 左侧数据1-20 -->
              <div
                class="recordSheet"
                style="width: 50%; box-sizing: border-box"
              >
                <el-table style="width: 100%; box-sizing: border-box">
                  <el-table-column label="测点编号" width="47.5">
                  </el-table-column>
                  <el-table-column label="钢筋公称直径 (mm)" width="69.75">
                  </el-table-column>
                  <el-table-column label="保护层厚度检测值(mm)">
                    <el-table-column label="第一次检测值" width="70.75">
                    </el-table-column>
                    <el-table-column label="第二次检测值" width="70.75">
                    </el-table-column>
                    <el-table-column label="修正值" width="69.75">
                    </el-table-column>
                    <el-table-column label="平均检测值" width="70.75">
                    </el-table-column>
                  </el-table-column>
                  <el-table-column label="偏差值(mm)" width="69.75">
                  </el-table-column>
                </el-table>
                <div
                  class="recordSheet_box"
                  v-for="(v, i) in recordData"
                  :key="i"
                >
                  <div class="recordSheet_box_1 row1_1">
                    <el-input
                      v-model="v.fCheckpointnumber"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_2 row1_2">
                    <el-input
                      v-model="v.fDiameter"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_3 row1_3">
                    <el-input
                      v-model="v.fFirstcheckvalue"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_3 row1_4">
                    <el-input
                      v-model="v.fSecondcheckvalue"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_2 row1_5">
                    <el-input
                      v-model="v.fCc"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_3 row1_6">
                    <el-input
                      v-model="v.fAvgvalue"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_4 row1_7" style="border: none">
                    <el-input
                      v-model="v.fSdvalue"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                </div>
              </div>
              <!-- 右侧数据21-40 -->
              <div
                class="recordSheet"
                style="
                  width: 50%;
                  box-sizing: border-box;
                  border-right: 1px solid #ccc;
                "
              >
                <el-table style="width: 100%; box-sizing: border-box">
                  <el-table-column label="测点编号" width="47.5">
                  </el-table-column>
                  <el-table-column label="钢筋公称直径 (mm)" width="69.75">
                  </el-table-column>

                  <el-table-column label="保护层厚度检测值(mm)">
                    <el-table-column label="第一次检测值" width="70.75">
                    </el-table-column>
                    <el-table-column label="第二次检测值" width="70.75">
                    </el-table-column>
                    <el-table-column label="修正值" width="69.75">
                    </el-table-column>
                    <el-table-column label="平均检测值" width="70.75">
                    </el-table-column>
                  </el-table-column>
                  <el-table-column label="偏差值(mm)" width="69.75">
                  </el-table-column>
                </el-table>
                <div
                  class="recordSheet_box"
                  v-for="(v, i) in recordData1"
                  :key="i"
                >
                  <div class="recordSheet_box_1 row1_1">
                    <el-input
                      v-model="v.fCheckpointnumber"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_2 row1_2">
                    <el-input
                      v-model="v.fDiameter"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_3 row1_3">
                    <el-input
                      v-model="v.fFirstcheckvalue"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_3 row1_4">
                    <el-input
                      v-model="v.fSecondcheckvalue"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_2 row1_5">
                    <el-input
                      v-model="v.fCc"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_3 row1_6">
                    <el-input
                      v-model="v.fAvgvalue"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_4 row1_7" style="border: none">
                    <el-input
                      v-model="v.fSdvalue"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                </div>
              </div>
            </div>
            <!--底部 第一行 -->
            <div class="bottom_box">
              <div class="bottom1_1">保护层厚度检测点数</div>
              <div class="bottom1_2" v-text="formData.fCheckpointcount"></div>
              <div class="bottom1_3" style="border-left: #ccc 1px solid">
                合格点数
              </div>
              <div
                class="bottom1_4"
                v-text="formData.fCheckpointqualifiedcount"
              ></div>
              <div class="bottom1_5">合格率(%)</div>
              <div
                class="bottom1_6"
                v-text="formData.fCheckpointqualifiedrate"
              ></div>
            </div>
            <!--底部 第二行 -->
            <div class="bottom_box">
              <div class="bottom1_1">保护层厚度平均值Dn(mm)</div>
              <div
                class="bottom1_2"
                v-text="formData.fCheckpointavgthickness"
              ></div>
              <div class="bottom1_3" style="border-left: #ccc 1px solid">
                标准偏差(mm)
              </div>
              <div class="bottom1_4" v-text="formData.fSd"></div>
              <div class="bottom1_5">保护层厚度特征值(mm)</div>
              <div class="bottom1_6" v-text="formData.fDne"></div>
            </div>
            <!-- 检测部位示意图 -->
            <div class="bottom_box box2">
              <div class="bottom1_1">检测部位示意图</div>
              <div class="bottom1_2">
                <el-input
                  v-show="false"
                  v-model="formData.fCheckpartimage"
                ></el-input>
                <div
                  style="
                    height: 25px;
                    line-height: 25px;
                    width: 100%;
                    display: flex;
                    border-radius: 5px;
                    margin: 8px 0 2px 0;
                  "
                >
                  <div
                    v-for="(v, i) in fPhotofilelist"
                    :key="i"
                    style="margin: 2px 3px; height: 87%"
                    @click="openPdfs(v)"
                  >
                    <img
                      style="max-width: 100%; max-height: 100%"
                      src="@/assets/img/pdf.png"
                    />
                  </div>
                </div>

                <el-button
                  v-show="!dis"
                  type="info"
                  icon="el-icon-search"
                  size="small"
                  @click="operation()"
                  style="margin: 8px 5px 2px 5px"
                  >操作</el-button
                >
              </div>
            </div>
            <!-- 附加声明 -->
            <div class="bottom_box box2">
              <div class="bottom1_1">附加声明</div>
              <div class="bottom1_2" v-text="formData.fAddcomments"></div>
            </div>
          </div>

          <!-- 钢筋保护层厚度试验检测报告 -->
          <div
            v-if="activeIndex == '2'"
            class="dialogBody common reportSheet"
            :style="{ height: dialogHeights }"
          >
            <header>
              钢筋保护层厚度试验检测报告
              <div class="printTable">
                <el-button
                  type="primary"
                  icon="el-icon-printer"
                  size="small"
                  @click="Print(2)"
                  >打印表格
                </el-button>
              </div>
            </header>
            <!-- 检测类型 -->
            <div
              class="top_box top_1"
              style="border-bottom: 1px solid #ccc"
              v-show="false"
            ></div>
            <!-- 头部 -->
            <div class="title">
              <div class="title_Name">
                <div class="title_input_text">检测单位名称(专用章):</div>
                <div
                  class="title_input_con"
                  v-text="formData.fCheckcompanyfullname"
                ></div>
              </div>
              <div class="title_input">
                <div class="title_input_text">报告编号：</div>
                <div
                  class="title_input_con"
                  v-text="formData.fReportnumber"
                ></div>
              </div>
            </div>
            <!-- 施工/委托单位 -->
            <div class="top_box top_1 top_2">
              <div class="top_4">
                <div class="bottom1_1" style="line-height: 40px !important">
                  施工/委托单位
                </div>

                <div class="bottom1_2" v-text="formData.fClientfullname"></div>
              </div>
              <div class="top_4">
                <div
                  class="bottom1_1"
                  style="
                    border-left: 1px solid #ccc;
                    line-height: 40px !important;
                  "
                >
                  工程名称
                </div>
                <div class="bottom1_2" v-text="formData.fProjectfullname"></div>
              </div>
            </div>
            <!-- 工程部位/用途 -->
            <div class="top_box top_1">
              <div class="bottom1_1">工程部位/用途</div>
              <div class="bottom1_2" v-text="formData.fProjectpartandapp"></div>
            </div>
            <!-- 样品信息 -->
            <div class="top_box top_1">
              <div class="bottom1_1">样品信息</div>
              <div class="bottom1_2" v-text="sample"></div>
            </div>
            <!-- 检测依据 -->
            <div class="top_box top_1">
              <div class="top_4">
                <div class="bottom1_1">检测依据</div>
                <div class="bottom1_2" v-text="formData.fCheckreference"></div>
              </div>
              <div class="top_4">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  判定依据
                </div>

                <div class="bottom1_2" v-text="formData.fDecidereference"></div>
              </div>
            </div>
            <!-- 主要仪器设备名称及编号 -->
            <div class="top_box top_1 top_2">
              <div class="bottom1_1">主要仪器设备<br />名称及编号</div>
              <div
                class="bottom1_2"
                v-text="formData.fMajorequipnameandnumber"
              ></div>
            </div>
            <!-- 龄期 -->
            <div class="top_box top_1">
              <div class="top_4">
                <div class="bottom1_1">龄期(d)</div>
                <div class="bottom1_2" v-text="formData.fAge"></div>
              </div>
              <div class="top_4">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  设计强度等级
                </div>
                <div class="bottom1_2" v-text="formData.fDesignintensity"></div>
              </div>
            </div>
            <!-- 构件名称 -->
            <div class="top_box top_1 box2">
              <div class="top_4 top_3">
                <div class="bottom1_1">构件名称</div>
                <div class="bottom1_2" v-text="formData.fComponentname"></div>
              </div>
              <div class="top_4 top_3">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  钢筋保护层厚度设计值Dnd(mm)
                </div>
                <div class="bottom1_2" v-text="formData.fDnd"></div>
              </div>
            </div>
            <!-- 垫块厚度C -->
            <div class="top_box top_1 box2">
              <div class="top_4 top_3">
                <div class="bottom1_1">垫块厚度C(mm)</div>
                <div class="bottom1_2" v-text="formData.fCo"></div>
              </div>
              <div class="top_4 top_3">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  规定值或允许偏差(mm)
                </div>
                <div class="bottom1_2" v-text="formData.fStandardvalue"></div>
              </div>
            </div>
            <!-- 表格 -->
            <div class="table_recordSheet table_report">
              <!-- 左侧数据1-20 -->
              <div
                class="recordSheet"
                style="width: 50%; box-sizing: border-box"
              >
                <el-table style="width: 100%; box-sizing: border-box">
                  <el-table-column prop="num" label="测点编号" width="93">
                  </el-table-column>
                  <el-table-column label="钢筋公称直径 (mm)" width="92">
                  </el-table-column>
                  <el-table-column
                    label="保护层厚度检测值 (mm)"
                    width="93"
                    style="padding: 0"
                  >
                  </el-table-column>
                  <el-table-column label="偏差值 (mm)" width="93">
                  </el-table-column>
                  <el-table-column
                    label="结果判定 "
                    width="93"
                    class-name="table_end"
                  >
                  </el-table-column>
                </el-table>
                <div
                  class="recordSheet_box"
                  v-for="(v, i) in recordData"
                  :key="i"
                  style="border-right: none"
                >
                  <div class="recordSheet_box_1 row1_1">
                    <el-input
                      v-model="v.fCheckpointnumber"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_1 row1_2">
                    <el-input
                      v-model="v.fDiameter"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_1 row1_3">
                    <el-input
                      v-model="v.fAvgvalue"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_1 row1_4">
                    <el-input
                      v-model="v.fSdvalue"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_1 row1_5" style="border: none">
                    <el-input
                      v-model="v.fResultdecide"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                </div>
              </div>
              <!-- 右侧数据21-40 -->
              <div
                class="recordSheet"
                style="
                  width: 50%;
                  box-sizing: border-box;
                  border-right: 1px solid #ccc;
                "
              >
                <el-table style="width: 100%; box-sizing: border-box">
                  <el-table-column prop="num" label="测点编号" width="93">
                  </el-table-column>
                  <el-table-column
                    prop="diameter"
                    label="钢筋公称直径 (mm)"
                    width="92"
                  >
                  </el-table-column>
                  <el-table-column
                    prop="diameter"
                    label="保护层厚度检测值 (mm)"
                    width="93"
                  >
                  </el-table-column>
                  <el-table-column
                    prop="diameter"
                    label="偏差值 (mm)"
                    width="93"
                  >
                  </el-table-column>
                  <el-table-column prop="diameter" label="结果判定 " width="93">
                  </el-table-column>
                </el-table>
                <div
                  class="recordSheet_box"
                  v-for="(v, i) in recordData1"
                  :key="i"
                  style="border-right: none"
                >
                  <div class="recordSheet_box_1 row1_1">
                    <el-input
                      v-model="v.fCheckpointnumber"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_1 row1_2">
                    <el-input
                      v-model="v.fDiameter"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_1 row1_3">
                    <el-input
                      v-model="v.fAvgvalue"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_1 row1_4">
                    <el-input
                      v-model="v.fSdvalue"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_1 row1_5" style="border: none">
                    <el-input
                      v-model="v.fResultdecide"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                </div>
              </div>
            </div>
            <!--底部 第一行 -->
            <div
              class="bottom_box"
              style="margin-top: 15px; border-top: #ccc 1px solid"
            >
              <div class="bottom1_1">保护层厚度检测点数</div>
              <div class="bottom1_2" v-text="formData.fCheckpointcount"></div>
              <div class="bottom1_3" style="border-left: #ccc 1px solid">
                合格点数
              </div>
              <div
                class="bottom1_4"
                v-text="formData.fCheckpointqualifiedcount"
              ></div>
              <div class="bottom1_5">合格率(%)</div>
              <div
                class="bottom1_6"
                v-text="formData.fCheckpointqualifiedrate"
              ></div>
            </div>
            <!--底部 第二行 -->
            <div class="bottom_box">
              <div class="bottom1_1">保护层厚度平均值Dn(mm)</div>
              <div
                class="bottom1_2"
                v-text="formData.fCheckpointavgthickness"
              ></div>
              <div class="bottom1_3" style="border-left: #ccc 1px solid">
                标准偏差(mm)
              </div>
              <div class="bottom1_4" v-text="formData.fSd"></div>
              <div class="bottom1_5">保护层厚度特征值(mm)</div>
              <div class="bottom1_6" v-text="formData.fDne"></div>
            </div>
            <!-- 保护层厚度特征值与设计值的比值Dne/Dnd -->
            <div
              class="top_box top_1 top_5 box2"
              style="border-bottom: 1px solid #ccc; border-top: none"
            >
              <div class="bottom1_1">保护层厚度特征值与设计值的比值Dne/Dnd</div>

              <div class="bottom1_2" v-text="formData.fRatioofdneanddnd"></div>
            </div>
            <!-- 检测结论 -->
            <div class="bottom_box box2">
              <div class="bottom1_1">检测结论</div>
              <div class="bottom1_2">
                <div
                  v-text="formData.fCheckresult"
                  style="line-height: 20px"
                ></div>
              </div>
            </div>
            <!-- 附加声明 -->
            <div class="bottom_box box2">
              <div class="bottom1_1">附加声明</div>
              <div class="bottom1_2" v-text="formData.fAddcomments"></div>
            </div>
            <!-- 监理意见及签字 -->
            <div class="bottom_box box3">
              <div class="bottom1_1">监理意见及签字</div>
              <div class="bottom1_2"></div>
            </div>
          </div>
          <div style="height: 40px">
            <div style="position: absolute; right: 5px; bottom: 0">
              <el-button type="warning" @click="resetForm()">关闭</el-button>
            </div>
          </div>
        </el-dialog>
      </div>
      <!-- 按工程划分新增 -->
      <div class="Control-1 mechanism_dialog ghgh">
        <el-dialog
          :close-on-click-modal="false"
          title="标段工程划分"
          v-dialogDrag
          :visible.sync="dialogTableVisibleDivide"
          v-loading="loadingDialogDivide"
          element-loading-text="拼命加载中"
          element-loading-spinner="el-icon-loading"
          element-loading-background="rgba(0, 0, 0, 0.2)"
        >
          <div
            class="dialogBody common"
            :style="{ height: dialogHeight }"
            style="overflow: hidden !important"
          >
            <!-- 工程划分列表 -->
            <div class="text_table" style="overflow: auto">
              <el-table
                @row-click="getRowInfos"
                ref="multipleTable"
                height="100%"
                :data="tableData5"
                style="width: 100%"
                border
                default-expand-all
                :tree-props="{
                  children: 'children',
                  hasChildren: 'hasChildren',
                }"
                row-key="f_CompanyId"
                v-loading="loadings"
                element-loading-text="拼命加载中"
                element-loading-spinner="el-icon-loading"
                element-loading-background="rgba(0, 0, 0, 0.2)"
                highlight-current-row
                @current-change="rowChange"
                stripe
              >
                <el-table-column
                  fixed
                  type="index"
                  label="序号"
                  width="50"
                  align="center"
                ></el-table-column>
                <el-table-column
                  prop="f_CompanyId"
                  label="工程编号"
                  width="200"
                ></el-table-column>
                <el-table-column
                  prop="f_FullName"
                  label="工程名称"
                ></el-table-column>
                <el-table-column
                  prop="f_Nature"
                  label="工程类别"
                  width="100"
                  align="center"
                >
                </el-table-column>
                <el-table-column
                  prop="f_ProtectionNote"
                  label="厚度设计值"
                  width="100"
                  align="center"
                >
                </el-table-column>
              </el-table>
            </div>
            <div style="height: 40px">
              <div style="position: absolute; right: 5px; bottom: 0">
                <el-button type="primary" @click="submit()">保存</el-button>
                <el-button type="warning" @click="resetForm()">关闭</el-button>
              </div>
            </div>
          </div>
        </el-dialog>
      </div>
      <!-- 样品信息 -->
      <div class="Control-1 samll mechanism_dialog Sample_dialog">
        <el-dialog
          title="样品信息详情"
          v-dialogDrag
          :visible.sync="dialogTableVisibleSample"
          v-loading="loadingDialogSample"
          element-loading-text="拼命加载中"
          element-loading-spinner="el-icon-loading"
          element-loading-background="rgba(0, 0, 0, 0.2)"
        >
          <div
            class="dialogBody common"
            :style="{ height: dialogHeightSample }"
          >
            <el-form
              :model="formDataSample"
              :rules="rulesSample"
              ref="formDataSample"
            >
              <div class="tableRow">
                <el-form-item
                  label="样品名称"
                  prop="sampleName"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="formDataSample.sampleName"
                    autocomplete="off"
                    placeholder="请输入"
                  ></el-input>
                </el-form-item>
              </div>
              <div class="tableRow">
                <el-form-item
                  label="样品编号"
                  prop="sampleNum"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="formDataSample.sampleNum"
                    autocomplete="off"
                    placeholder="请输入"
                    disabled
                  ></el-input>
                </el-form-item>
              </div>

              <div class="tableRow" style="margin-top: 10px">
                <el-form-item
                  label="样品状态"
                  prop="sampleStatus"
                  :label-width="formLabelWidth"
                >
                  <el-checkbox
                    :indeterminate="isIndeterminate"
                    v-model="checkAll"
                    @change="handleCheckAllChange"
                    >全选
                  </el-checkbox>
                  <div style="margin: 10px 0"></div>
                  <el-checkbox-group
                    v-model="checkedCities"
                    @change="handleCheckedCitiesChange"
                  >
                    <el-checkbox
                      v-for="city in cities"
                      :label="city"
                      :key="city"
                      >{{ city }}</el-checkbox
                    >
                  </el-checkbox-group>
                </el-form-item>
              </div>

              <el-form-item class="newlyAdded_btn">
                <el-button
                  type="primary"
                  @click="submitFormSample('formDataSample')"
                  >保存</el-button
                >
                <el-button
                  type="warning"
                  @click="resetFormSample('formDataSample')"
                  >关闭</el-button
                >
              </el-form-item>
            </el-form>
          </div>
        </el-dialog>
      </div>
      <!-- 记录表-->
      <div class="steelSheet Control-1 big_dialog">
        <el-dialog
          title="钢筋保护层厚度试验检测记录表"
          v-dialogDrag
          :visible.sync="dialogTableVisibleJl"
          v-loading="loadingDialogJl"
          element-loading-text="拼命加载中"
          element-loading-spinner="el-icon-loading"
          element-loading-background="rgba(0, 0, 0, 0.2)"
        >
          <div class="dialogBody common" :style="{ height: dialogHeights }">
            <header>
              钢筋保护层厚度试验检测记录表
              <div class="printTable">
                <el-button
                  type="primary"
                  icon="el-icon-printer"
                  size="small"
                  @click="Print(1)"
                  >打印表格
                </el-button>
              </div>
            </header>
            <!-- 检测类型 -->
            <div class="top_box top_1" style="border-bottom: 1px solid #ccc">
              <div class="bottom1_1" style="background: #f5f7fa">
                检测类型：
              </div>
              <div class="bottom1_2">
                <el-select
                  v-model="formData.fChecktype"
                  placeholder="请选择"
                  disabled
                >
                  <el-option
                    v-for="(v, i) in Checktype"
                    :key="i"
                    :label="v.fItemName"
                    :value="v.fItemName"
                  >
                  </el-option>
                </el-select>
              </div>
            </div>
            <!-- 头部 -->
            <div class="title">
              <div class="title_Name title_record">
                <div class="title_input_text">检测单位名称：</div>
                <div
                  class="title_input_con"
                  v-text="formData.fCheckcompanyfullname"
                ></div>
              </div>
              <div class="title_input">
                <div class="title_input_text">记录编号：</div>
                <div
                  class="title_input_con"
                  v-text="formData.fRecordnumber"
                ></div>
              </div>
            </div>
            <!-- 工程名称 -->
            <div class="top_box top_1">
              <div class="bottom1_1" style="background: #f5f7fa">工程名称</div>
              <div class="bottom1_2" v-text="formData.fProjectfullnam"></div>
            </div>
            <!-- 工程部位/用途 -->
            <div class="top_box top_1">
              <div class="bottom1_1">工程部位/用途</div>
              <div class="bottom1_2" v-text="formData.fProjectpartandapp"></div>
            </div>
            <!-- 样品信息 -->
            <div class="top_box top_1">
              <div class="bottom1_1">样品信息</div>
              <div class="bottom1_2" v-text="sample"></div>
            </div>
            <!-- 试验检测日期 -->
            <div class="top_box top_1">
              <div class="top_4">
                <div class="bottom1_1">试验检测日期</div>
                <div class="bottom1_2" v-text="formData.fCheckdates"></div>
              </div>
              <div class="top_4">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  试验条件
                </div>
                <div
                  class="bottom1_2"
                  v-text="formData.fCheckenvironment"
                ></div>
              </div>
            </div>
            <!-- 检测依据 -->
            <div class="top_box top_1">
              <div class="top_4">
                <div class="bottom1_1">检测依据</div>
                <div class="bottom1_2" v-text="formData.fCheckreference"></div>
              </div>
              <div class="top_4">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  判定依据
                </div>

                <div class="bottom1_2" v-text="formData.fDecidereference"></div>
              </div>
            </div>
            <!-- 主要仪器设备名称及编号 -->
            <div class="top_box top_1 top_2">
              <div class="bottom1_1">主要仪器设备<br />名称及编号</div>
              <div
                class="bottom1_2"
                v-text="formData.fMajorequipnameandnumber"
              ></div>
            </div>
            <!-- 钢筋工称直径 -->
            <div class="top_box top_1">
              <div class="top_4 top_3">
                <div class="bottom1_1">钢筋公称直径</div>
                <div class="bottom1_2" v-text="formData.fDiameter"></div>
              </div>
              <div class="top_4 top_3">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  修正值
                </div>
                <div class="bottom1_2" v-text="formData.fCc"></div>
              </div>
            </div>
            <!-- 报告编号 -->
            <div class="top_box top_1">
              <div class="top_4 top_3">
                <div class="bottom1_1">报告编号</div>
                <div class="bottom1_2" v-text="formData.fReportnumber"></div>
              </div>
              <div class="top_4 top_3">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  报告日期
                </div>
                <div class="bottom1_2" v-text="formData.fReportdates"></div>
              </div>
            </div>
            <!-- 构件名称 -->
            <div class="top_box top_1">
              <div class="top_4 top_3">
                <div class="bottom1_1">构件名称</div>
                <div class="bottom1_2" v-text="formData.fComponentname"></div>
              </div>
              <div class="top_4 top_3">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  钢筋保护层厚度设计值Dnd(mm)
                </div>
                <div class="bottom1_2" v-text="formData.fDnd"></div>
              </div>
            </div>
            <!-- 垫块厚度C -->
            <div class="top_box top_1">
              <div class="top_4 top_3">
                <div class="bottom1_1">垫块厚度C(mm)</div>
                <div class="bottom1_2" v-text="formData.fCo"></div>
              </div>
              <div class="top_4 top_3">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  规定值或允许偏差(mm)
                </div>
                <div class="bottom1_2" v-text="formData.fStandardvalue"></div>
              </div>
            </div>
            <!-- 钢筋保护层厚度判定系数 -->
            <div class="top_box top_1 top_5">
              <div class="bottom1_1">钢筋保护层厚度判定系数</div>

              <div
                class="bottom1_2"
                v-text="formData.fThicknessdecidecoefficient"
              ></div>
            </div>
            <!-- 表格 -->
            <div class="table_recordSheet">
              <!-- 左侧数据1-20 -->
              <div
                class="recordSheet"
                style="width: 50%; box-sizing: border-box"
              >
                <el-table style="width: 100%; box-sizing: border-box">
                  <el-table-column label="测点编号" width="47.5">
                  </el-table-column>
                  <el-table-column label="钢筋公称直径 (mm)" width="69.75">
                  </el-table-column>
                  <el-table-column label="保护层厚度检测值(mm)">
                    <el-table-column label="第一次检测值" width="70.75">
                    </el-table-column>
                    <el-table-column label="第二次检测值" width="70.75">
                    </el-table-column>
                    <el-table-column label="修正值" width="69.75">
                    </el-table-column>
                    <el-table-column label="平均检测值" width="70.75">
                    </el-table-column>
                  </el-table-column>
                  <el-table-column label="偏差值(mm)" width="69.75">
                  </el-table-column>
                </el-table>
                <div
                  class="recordSheet_box"
                  v-for="(v, i) in recordData"
                  :key="i"
                >
                  <div class="recordSheet_box_1 row1_1">
                    <el-input
                      v-model="v.fCheckpointnumber"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_2 row1_2">
                    <el-input
                      v-model="v.fDiameter"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_3 row1_3">
                    <el-input
                      v-model="v.fFirstcheckvalue"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_3 row1_4">
                    <el-input
                      v-model="v.fSecondcheckvalue"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_2 row1_5">
                    <el-input
                      v-model="v.fCc"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_3 row1_6">
                    <el-input
                      v-model="v.fAvgvalue"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_4 row1_7" style="border: none">
                    <el-input
                      v-model="v.fSdvalue"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                </div>
              </div>
              <!-- 右侧数据21-40 -->
              <div
                class="recordSheet"
                style="
                  width: 50%;
                  box-sizing: border-box;
                  border-right: 1px solid #ccc;
                "
              >
                <el-table style="width: 100%; box-sizing: border-box">
                  <el-table-column label="测点编号" width="47.5">
                  </el-table-column>
                  <el-table-column label="钢筋公称直径 (mm)" width="69.75">
                  </el-table-column>

                  <el-table-column label="保护层厚度检测值(mm)">
                    <el-table-column label="第一次检测值" width="70.75">
                    </el-table-column>
                    <el-table-column label="第二次检测值" width="70.75">
                    </el-table-column>
                    <el-table-column label="修正值" width="69.75">
                    </el-table-column>
                    <el-table-column label="平均检测值" width="70.75">
                    </el-table-column>
                  </el-table-column>
                  <el-table-column label="偏差值(mm)" width="69.75">
                  </el-table-column>
                </el-table>
                <div
                  class="recordSheet_box"
                  v-for="(v, i) in recordData1"
                  :key="i"
                >
                  <div class="recordSheet_box_1 row1_1">
                    <el-input
                      v-model="v.fCheckpointnumber"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_2 row1_2">
                    <el-input
                      v-model="v.fDiameter"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_3 row1_3">
                    <el-input
                      v-model="v.fFirstcheckvalue"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_3 row1_4">
                    <el-input
                      v-model="v.fSecondcheckvalue"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_2 row1_5">
                    <el-input
                      v-model="v.fCc"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_3 row1_6">
                    <el-input
                      v-model="v.fAvgvalue"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_4 row1_7" style="border: none">
                    <el-input
                      v-model="v.fSdvalue"
                      placeholder="/"
                      class="center_text"
                      disabled
                    ></el-input>
                  </div>
                </div>
              </div>
            </div>
            <!--底部 第一行 -->
            <div class="bottom_box">
              <div class="bottom1_1">保护层厚度检测点数</div>
              <div class="bottom1_2" v-text="formData.fCheckpointcount"></div>
              <div class="bottom1_3" style="border-left: #ccc 1px solid">
                合格点数
              </div>
              <div
                class="bottom1_4"
                v-text="formData.fCheckpointqualifiedcount"
              ></div>
              <div class="bottom1_5">合格率(%)</div>
              <div
                class="bottom1_6"
                v-text="formData.fCheckpointqualifiedrate"
              ></div>
            </div>
            <!--底部 第二行 -->
            <div class="bottom_box">
              <div class="bottom1_1">保护层厚度平均值Dn(mm)</div>
              <div
                class="bottom1_2"
                v-text="formData.fCheckpointavgthickness"
              ></div>
              <div class="bottom1_3" style="border-left: #ccc 1px solid">
                标准偏差(mm)
              </div>
              <div class="bottom1_4" v-text="formData.fSd"></div>
              <div class="bottom1_5">保护层厚度特征值(mm)</div>
              <div class="bottom1_6" v-text="formData.fDne"></div>
            </div>
            <!-- 检测部位示意图 -->
            <div class="bottom_box box2">
              <div class="bottom1_1">检测部位示意图</div>
              <div class="bottom1_2">
                <el-input
                  v-show="false"
                  v-model="formData.fCheckpartimage"
                ></el-input>
                <div
                  ref="fPhotofilelist"
                  style="
                    height: 25px;
                    line-height: 25px;
                    width: 100%;
                    display: flex;
                    border-radius: 5px;
                    margin: 8px 0 2px 0;
                  "
                >
                  <div
                    v-for="(v, i) in fPhotofilelist"
                    :key="i"
                    style="margin: 2px 3px; height: 87%"
                    @click="openPdfs(v)"
                  >
                    <img
                      style="max-width: 100%; max-height: 100%"
                      src="@/assets/img/pdf.png"
                    />
                  </div>
                </div>

                <el-button
                  v-show="!dis"
                  type="info"
                  icon="el-icon-search"
                  size="small"
                  @click="operation()"
                  style="margin: 8px 5px 2px 5px"
                  >操作</el-button
                >
              </div>
            </div>
            <!-- 附加声明 -->
            <div class="bottom_box box2">
              <div class="bottom1_1">附加声明</div>
              <div class="bottom1_2" v-text="formData.fAddcomments"></div>
            </div>
          </div>
          <div style="height: 40px">
            <div style="position: absolute; right: 5px; bottom: 0">
              <el-button type="warning" @click="resetForm()">关闭</el-button>
            </div>
          </div>
        </el-dialog>
      </div>
      <!-- 报告表 -->
      <div class="steelSheet Control-1 big_dialog">
        <el-dialog
          title="钢筋保护层厚度试验检测报告"
          v-dialogDrag
          :visible.sync="dialogTableVisibleBg"
          v-loading="loadingDialogBg"
          element-loading-text="拼命加载中"
          element-loading-spinner="el-icon-loading"
          element-loading-background="rgba(0, 0, 0, 0.2)"
        >
          <div
            class="dialogBody common reportSheet"
            :style="{ height: dialogHeights }"
          >
            <header>
              钢筋保护层厚度试验检测报告
              <div class="printTable">
                <el-button
                  type="primary"
                  icon="el-icon-printer"
                  size="small"
                  @click="Print(2)"
                  >打印表格
                </el-button>
              </div>
            </header>
            <!-- 检测类型 -->
            <div
              class="top_box top_1"
              style="border-bottom: 1px solid #ccc"
              v-show="false"
            ></div>
            <!-- 头部 -->
            <div class="title">
              <div class="title_Name">
                <div class="title_input_text">检测单位名称(专用章):</div>
                <div
                  class="title_input_con"
                  v-text="formData.fCheckcompanyfullname"
                ></div>
              </div>
              <div class="title_input">
                <div class="title_input_text">报告编号：</div>
                <div
                  class="title_input_con"
                  v-text="formData.fReportnumber"
                ></div>
              </div>
            </div>
            <!-- 施工/委托单位 -->
            <div class="top_box top_1 top_2">
              <div class="top_4">
                <div class="bottom1_1" style="line-height: 40px !important">
                  施工/委托单位
                </div>

                <div class="bottom1_2" v-text="formData.fClientfullname"></div>
              </div>
              <div class="top_4">
                <div
                  class="bottom1_1"
                  style="
                    border-left: 1px solid #ccc;
                    line-height: 40px !important;
                  "
                >
                  工程名称
                </div>
                <div class="bottom1_2" v-text="formData.fProjectfullname"></div>
              </div>
            </div>
            <!-- 工程部位/用途 -->
            <div class="top_box top_1">
              <div class="bottom1_1">工程部位/用途</div>
              <div class="bottom1_2" v-text="formData.fProjectpartandapp"></div>
            </div>
            <!-- 样品信息 -->
            <div class="top_box top_1">
              <div class="bottom1_1">样品信息</div>
              <div class="bottom1_2" v-text="sample"></div>
            </div>
            <!-- 检测依据 -->
            <div class="top_box top_1">
              <div class="top_4">
                <div class="bottom1_1">检测依据</div>
                <div class="bottom1_2" v-text="formData.fCheckreference"></div>
              </div>
              <div class="top_4">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  判定依据
                </div>

                <div class="bottom1_2" v-text="formData.fDecidereference"></div>
              </div>
            </div>
            <!-- 主要仪器设备名称及编号 -->
            <div class="top_box top_1 top_2">
              <div class="bottom1_1">主要仪器设备<br />名称及编号</div>
              <div
                class="bottom1_2"
                v-text="formData.fMajorequipnameandnumber"
              ></div>
            </div>
            <!-- 龄期 -->
            <div class="top_box top_1">
              <div class="top_4">
                <div class="bottom1_1">龄期(d)</div>
                <div class="bottom1_2" v-text="formData.fAge"></div>
              </div>
              <div class="top_4">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  设计强度等级
                </div>
                <div class="bottom1_2" v-text="formData.fDesignintensity"></div>
              </div>
            </div>
            <!-- 构件名称 -->
            <div class="top_box top_1 box2">
              <div class="top_4 top_3">
                <div class="bottom1_1">构件名称</div>
                <div class="bottom1_2" v-text="formData.fComponentname"></div>
              </div>
              <div class="top_4 top_3">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  钢筋保护层厚度设计值Dnd(mm)
                </div>
                <div class="bottom1_2" v-text="formData.fDnd"></div>
              </div>
            </div>
            <!-- 垫块厚度C -->
            <div class="top_box top_1 box2">
              <div class="top_4 top_3">
                <div class="bottom1_1">垫块厚度C(mm)</div>
                <div class="bottom1_2" v-text="formData.fCo"></div>
              </div>
              <div class="top_4 top_3">
                <div class="bottom1_1" style="border-left: 1px solid #ccc">
                  规定值或允许偏差(mm)
                </div>
                <div class="bottom1_2" v-text="formData.fStandardvalue"></div>
              </div>
            </div>
            <!-- 表格 -->
            <div class="table_recordSheet table_report">
              <!-- 左侧数据1-20 -->
              <div
                class="recordSheet"
                style="width: 50%; box-sizing: border-box"
              >
                <el-table style="width: 100%; box-sizing: border-box">
                  <el-table-column prop="num" label="测点编号" width="93">
                  </el-table-column>
                  <el-table-column label="钢筋公称直径 (mm)" width="92">
                  </el-table-column>
                  <el-table-column
                    label="保护层厚度检测值 (mm)"
                    width="93"
                    style="padding: 0"
                  >
                  </el-table-column>
                  <el-table-column label="偏差值 (mm)" width="93">
                  </el-table-column>
                  <el-table-column
                    label="结果判定 "
                    width="93"
                    class-name="table_end"
                  >
                  </el-table-column>
                </el-table>
                <div
                  class="recordSheet_box"
                  v-for="(v, i) in recordData"
                  :key="i"
                  style="border-right: none"
                >
                  <div class="recordSheet_box_1 row1_1">
                    <el-input
                      v-model="v.fCheckpointnumber"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_1 row1_2">
                    <el-input
                      v-model="v.fDiameter"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_1 row1_3">
                    <el-input
                      v-model="v.fAvgvalue"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_1 row1_4">
                    <el-input
                      v-model="v.fSdvalue"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_1 row1_5" style="border: none">
                    <el-input
                      v-model="v.fResultdecide"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                </div>
              </div>
              <!-- 右侧数据21-40 -->
              <div
                class="recordSheet"
                style="
                  width: 50%;
                  box-sizing: border-box;
                  border-right: 1px solid #ccc;
                "
              >
                <el-table style="width: 100%; box-sizing: border-box">
                  <el-table-column prop="num" label="测点编号" width="93">
                  </el-table-column>
                  <el-table-column
                    prop="diameter"
                    label="钢筋公称直径 (mm)"
                    width="92"
                  >
                  </el-table-column>
                  <el-table-column
                    prop="diameter"
                    label="保护层厚度检测值 (mm)"
                    width="93"
                  >
                  </el-table-column>
                  <el-table-column
                    prop="diameter"
                    label="偏差值 (mm)"
                    width="93"
                  >
                  </el-table-column>
                  <el-table-column prop="diameter" label="结果判定 " width="93">
                  </el-table-column>
                </el-table>
                <div
                  class="recordSheet_box"
                  v-for="(v, i) in recordData1"
                  :key="i"
                  style="border-right: none"
                >
                  <div class="recordSheet_box_1 row1_1">
                    <el-input
                      v-model="v.fCheckpointnumber"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_1 row1_2">
                    <el-input
                      v-model="v.fDiameter"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_1 row1_3">
                    <el-input
                      v-model="v.fAvgvalue"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_1 row1_4">
                    <el-input
                      v-model="v.fSdvalue"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                  <div class="recordSheet_box_1 row1_5" style="border: none">
                    <el-input
                      v-model="v.fResultdecide"
                      placeholder="/"
                      disabled
                      class="center_text"
                    ></el-input>
                  </div>
                </div>
              </div>
            </div>
            <!--底部 第一行 -->
            <div
              class="bottom_box"
              style="margin-top: 15px; border-top: #ccc 1px solid"
            >
              <div class="bottom1_1">保护层厚度检测点数</div>
              <div class="bottom1_2" v-text="formData.fCheckpointcount"></div>
              <div class="bottom1_3" style="border-left: #ccc 1px solid">
                合格点数
              </div>
              <div
                class="bottom1_4"
                v-text="formData.fCheckpointqualifiedcount"
              ></div>
              <div class="bottom1_5">合格率(%)</div>
              <div
                class="bottom1_6"
                v-text="formData.fCheckpointqualifiedrate"
              ></div>
            </div>
            <!--底部 第二行 -->
            <div class="bottom_box">
              <div class="bottom1_1">保护层厚度平均值Dn(mm)</div>
              <div
                class="bottom1_2"
                v-text="formData.fCheckpointavgthickness"
              ></div>
              <div class="bottom1_3" style="border-left: #ccc 1px solid">
                标准偏差(mm)
              </div>
              <div class="bottom1_4" v-text="formData.fSd"></div>
              <div class="bottom1_5">保护层厚度特征值(mm)</div>
              <div class="bottom1_6" v-text="formData.fDne"></div>
            </div>
            <!-- 保护层厚度特征值与设计值的比值Dne/Dnd -->
            <div
              class="top_box top_1 top_5 box2"
              style="border-bottom: 1px solid #ccc; border-top: none"
            >
              <div class="bottom1_1">保护层厚度特征值与设计值的比值Dne/Dnd</div>

              <div class="bottom1_2" v-text="formData.fRatioofdneanddnd"></div>
            </div>
            <!-- 检测结论 -->
            <div class="bottom_box box2">
              <div class="bottom1_1">检测结论</div>
              <div class="bottom1_2">
                <div
                  v-text="formData.fCheckresult"
                  style="line-height: 20px"
                ></div>
              </div>
            </div>
            <!-- 附加声明 -->
            <div class="bottom_box box2">
              <div class="bottom1_1">附加声明</div>
              <div class="bottom1_2" v-text="formData.fAddcomments"></div>
            </div>
          </div>
          <div style="height: 40px">
            <div style="position: absolute; right: 5px; bottom: 0">
              <el-button type="warning" @click="resetForm()">关闭</el-button>
            </div>
          </div>
        </el-dialog>
      </div>
      <!-- 上传附件  -->
      <div class="Control-1 mechanism_dialog enclosure">
        <el-dialog
          title="上传附件"
          v-dialogDrag
          top="-17vh"
          :visible.sync="dialogTableVisibleTexts"
          v-loading="loadingDialogTexts"
          element-loading-text="拼命加载中"
          element-loading-spinner="el-icon-loading"
          element-loading-background="rgba(0, 0, 0, 0.2)"
        >
          <div class="dialogBody common" :style="{ height: '240px' }">
            <el-upload
              action="action"
              ref="upload"
              list-type="picture-card"
              :file-list="fPhotofilelist"
              :auto-upload="false"
              :on-change="handleChange"
              accept=".pdf"
            >
              <i slot="default" class="el-icon-plus"></i>
              <div
                style="width: 100%; height: 100%; text-align: center"
                slot="file"
                slot-scope="{ file }"
              >
                <div
                  style="
                    width: 100%;
                    height: 100%;
                    display: flex;
                    justify-content: center;
                    align-items: center;
                  "
                  class="images"
                >
                  <img
                    style="max-width: 100%; max-height: 100%"
                    src="@/assets/img/pdf.png"
                  />
                </div>
                <span class="el-upload-list__item-actions">
                  <span
                    title="文件预览"
                    class="el-upload-list__item-preview"
                    @click="openPdf(file)"
                  >
                    <i class="el-icon-zoom-in"></i>
                  </span>
                  <span
                    title="删除文件"
                    class="el-upload-list__item-delete"
                    @click="handleRemove(file)"
                  >
                    <i class="el-icon-delete"></i>
                  </span>
                </span>
              </div>
            </el-upload>
            <div>
              <div style="position: absolute; right: 5px; bottom: 0">
                <el-button type="primary" @click="submitUpload(enclosureImg)"
                  >保存</el-button
                >
              </div>
            </div>
          </div>
        </el-dialog>
      </div>

      <div class="Control-2">
        <el-dialog :title="fFileName" v-dialogDrag :visible.sync="dialogPdf">
          <div :style="{ height: dialogHeights }">
            <!-- <iframe
              :src="pdfUrl"
              width="100%"
              height="100%"
              frameborder="0"
            ></iframe> -->
            <embed :src="`${pdfUrl}#toolbar=0`" hidden="false" type="application/pdf" height="100%" width="100%" />
          </div>
        </el-dialog>
      </div>
    </div>
  </div>
</template>

<script>
const cityOptions = [
  "表面光洁、干净、干燥 12",
  "表面光洁、干净、干燥 13",
  "表面光洁、干净、干燥 14",
];
import {
  getProtectioncoursePageList,
  getConcreteProjectList,
  getProtectioncourseByFid,
  addProtectioncourse,
  deleteProtectioncourse,
  submitProtectioncourse,
  getProtectioncourseRecordNumber,
  getMangEquipmentList,
  getCheckTypeByUserId,
  getCheckitemsList,
  upload,
} from "@/api/request.js";
export default {
  inject: ["reload"],
  name: "Home",
  data() {
    return {
      name: "Steel-1Text",
      navigatepageNums: null,
      queryCriteriaData: {},
      autoSave: 0,
      yj_addRecord: null,
      yj_addProject: null,
      yj_submit: null,
      yj_edit: null,
      yj_delete: null,
      // 上传附件
      fPhotofilelist: [], //上传总数
      dialogTableVisibleTexts: false,
      loadingDialogTexts: false,
      attachmentDetails: [],
      enclosureImg: null,
      timestamp: null,
      dis: false,
      dialogPdf: false,
      pdfUrl: "",
      fFileName: "", // 上传附件

      btnSee: true, //按钮显示隐藏
      seeNum: true, //控制填写数据表格是否可填写
      dialogTableVisibleBg: false, //报告
      loadingDialogBg: false, //报告
      dialogTableVisibleJl: false, //记录表
      loadingDialogJl: false, //记录表
      TestnoteData: [], //回弹试验依据
      JudgetypeData: [], //回弹判定依据
      Checktype: [], //检测类型
      fCheckresultList: [], //检测结论

      // 样品信息
      checkAll: false,
      checkedCities: [], //打开默认选中
      cities: cityOptions, //可选项
      isIndeterminate: true,

      dialogTableVisibleSample: false,
      loadingDialogSample: false,

      dialogHeightSample: "",
      formDataSample: { sampleName: null, sampleNum: null, sampleStatus: [] },
      rulesSample: {
        sampleName: [
          { required: true, message: "请输入角色编码", trigger: "blur" },
        ],
        sampleNum: [
          { required: true, message: "请输入角色名称", trigger: "blur" },
        ],
        sampleStatus: [
          { required: true, message: "请输入角色名称", trigger: "blur" },
        ],
        fPhotofilelist: [{ required: true, message: "请选择回弹记录表" }],
      },
      // 样品信息
      // 按工程划分新增
      dialogTableVisibleDivide: false,
      loadingDialogDivide: false,
      rowD: null,
      tableData5: [],
      tableData1: [],
      fProjectpartid: null,
      fDnd: null,
      fProjectpart: null,
      // 按工程划分新增
      activeIndex: "1",
      departmentList: [
        { text: "混凝土回弹检测仪器设备" },
        { text: "钢筋保护层厚度检测设备" },
      ], //外检设备类型
      radio: "待办",
      dialogHeight: "",
      dialogHeights: "",
      fId: null, //当前数据fId
      loading: false,
      loadings: false,
      fDepartmentid: "", //当前行部门id
      dialogFormVisible: false,
      userInfo: {}, //登录用户
      // 列表
      getList: {
        modelType: "0", // 0代办 1已办  2查询页面
        fCompanyid: null, //机构id
        fUserid: null, //当前登录用户id
        sublevel: null, //查看下级  1是0否
        page: 1, //页码
        pageSize: 20, //每页条数
      },
      // 新增/编辑
      //查看
      loadingDialogSee: false,
      dialogTableVisibleSee: false,
      //查看
      dialogText: "",
      dialogTableVisible: false,
      loadingDialog: false,
      fMajorequipnameandnumber: null,
      fEquipmentname: null, //已选主要仪器设备
      fCheckdates: "", //试验检测日期
      fReportdates: "", //报告日期
      formData: {
        fCreatedate: "新增",
        fId: "", //信息表fid     空或不传为新增  有值为修改
        fProjectid: "", //工程id//当前登录人项目id
        fProjectname: "", //工程名称简称//当前登录人项目名
        fProjectfullname: "", //工程全称//当前登录人项目全称
        fChecktype: "", //检测类型
        fCheckcompanyid: "", //检测单位id
        fCheckcompanyname: "", //检测单位简称
        fCheckcompanyfullname: "", //检测单位全称
        fClientid: "", //施工委托单位id//当前登录人机构
        fClientname: "", //施工委托单位简称//当前登录人机构
        fClientfullname: "", //施工委托单位全称//当前登录人机构全称
        fProjectpartid: "", //工程部位id
        fProjectpartandapp: "", //工程部位/用途
        fSamplenumber: "", //样品编号
        fSamplename: "", //样品名称
        fSampledescription: "", //样品描述
        fMajorequipnameandnumber: "", //主要仪器设备名称及编号
        fMajorequipids: "", // 主要仪器设备ids
        fAge: "", //龄期
        fDesignintensity: "", //设计强度等级
        fCheckenvironment: "", //试验条件
        fRecordnumber: "", //记录编号
        fCheckdates: "", //试验检测日期
        fCheckreference: "", //检测依据
        fDecidereference: "", //判定依据
        fReportdates: "", //报告日期
        fComponentname: "", //构件名称
        fDnd: "", //保护层厚度设计值
        fCo: "", //垫块厚度Co
        fStandardvalue: "", //规定值或允许偏差
        fThicknessdecidecoefficient: "", //钢筋保护层判定系数
        fDiameter: "", //钢筋公称直径
        fCc: "", //修正值
        fReportnumber: "", //报告编号
        fAddcomments: "", //附加说明
        fCheckresult: "", //检测结论
        fCheckpointcount: "", //保护层厚度检测点数
        fCheckpointqualifiedcount: "", //合格点数
        fCheckpointqualifiedrate: "", //合格率
        fCheckpointavgthickness: "", //保护层厚度平均值
        fSd: "", //标准偏差
        fDne: "", //保护层厚度特征值
        fRatioofdneanddnd: "", //保护层厚度特征值与设计值的比值   DNE/DND
        fCheckpartimage: "", //检测部位示意图id
        userId: "", //当前登陆用户id
        userName: "", //当前登陆用户名称
        companyId: "", //当前登陆用户机构id
        companyName: "", //当前登陆用户机构名称
        fCompanyid: null, //机构id
        checkPointList: [
          //测点集合
          {
            fCheckpointnumber: "", //测点编号
            fFirstcheckvalue: "", //第一次检测值
            fSecondcheckvalue: "", //第二次检测值
            fAvgvalue: "", //平均值
            fSdvalue: "", //偏差值
            fResultdecide: "", //结果判定
          },
        ],
        recordfiles: [],
      },
      sample: "/", //样品信息
      recordData: [], //记录表1-20数据
      recordData1: [], //记录表21-40数据
      oneNum: null,
      twoNum: null,
      row: null,
      formLabelWidth: "",
      tableData: [], //表格数据列表
      dialogVisible: false,
      numList: [], // 表格填写的数据
    };
  },
  created() {
    this.userInfo = JSON.parse(sessionStorage.getItem("userInfo"));
    this.getList.fUserid = this.userInfo.userId;
    this.getList.fCompanyid = this.userInfo.companyId;
  },
  mounted() {
    this.getHeight();
    this.getDataList(this.getList);
    this.testBasis(5);
    this.testBasis(6);
    this.getEquipment();
    this.getDate();
    this.btnRole(this.name);
  },

  methods: {
    // 上传文件
    handleChange(res) {
      this.attachmentDetails.push(res);
      this.enclosureImg = new FormData(); //new一个formData事件
      this.enclosureImg.append("folderid", this.timestamp); //将file属性添加到formData里
      this.enclosureImg.append("file", res.raw); //将file属性添加到formData里
      this.enclosureImg.append("userId", this.userInfo.userId); //将file属性添加到formData里
      this.enclosureImg.append("userName", this.userInfo.realName); //将file属性添加到formData里

      upload(this.enclosureImg).then((i) => {
        i[0]["name"] = res.name;
        i[0]["url"] = res.url;
        this.fPhotofilelist.push(i[0]);
      });
    },
    // 操作按钮
    operation() {
      this.dialogTableVisibleTexts = true;
    },
    // 预览
    openPdf(file) {
      this.dialogPdf = true;
      this.pdfUrl = file.url;
      this.fFileName = file.name;
    },
    // 保留文件，点击查看
    openPdfs(v) {
      this.dialogPdf = true;
      this.pdfUrl = v.url;
      this.fFileName = v.fFileName;
    }, // 移除
    handleRemove(file) {
      this.$refs.upload.handleRemove(file);
      for (let index = 0; index < this.fPhotofilelist.length; index++) {
        if (file.uid == this.fPhotofilelist[index].uid) {
          if (this.fPhotofilelist[index].atta == undefined) {
            this.formData.recordfiles.push({
              fId: this.fPhotofilelist[index].fId,
            });
          } else {
            this.formData.recordfiles.push({
              fId: this.fPhotofilelist[index].atta.fId,
            });
          }
          this.fPhotofilelist.splice(index, 1);
        }
      }
    }, // 保存
    submitUpload() {
      this.dialogTableVisibleTexts = false;
    }, // 上传附件
    btnRole(name) {
      var btnList = [];
      var ModuleList = JSON.parse(sessionStorage.getItem("ModuleList"));
      if (ModuleList.length > 0) {
        ModuleList.map((item) => {
          if (item.fEncode == name) {
            btnList = item.modulebuttonList;
          }
        });
        var btnStr = [];
        btnList.map((item) => {
          btnStr.push(item.fEncode);
        });

        this.yj_submit = btnStr.includes("yj_submit");
        this.yj_edit = btnStr.includes("yj_edit");
        this.yj_delete = btnStr.includes("yj_delete");
        this.yj_addRecord = btnStr.includes("yj_addRecord");
        this.yj_addProject = btnStr.includes("yj_addProject");
      } else {
        this.yj_submit = true;
        this.yj_edit = true;
        this.yj_delete = true;
        this.yj_addRecord = true;
        this.yj_addProject = true;
      }
    },

    // 打印
    Print(e) {
      if (e == 1) {
        window.open(
          "http://1.14.19.236:8054/concreteScreen/App/upload/getProtectioncourseRecordPDF.do?fId=" +
            this.fId
        );
      } else {
        window.open(
          "http://1.14.19.236:8054/concreteScreen/App/upload/getProtectioncourseReportPDF.do?fId=" +
            this.fId
        );
      }
    },
    // 打印
    // 计算
    inputCheckpointnumber() {
      this.formData.checkPointList = this.recordData.concat(this.recordData1);
      // 钢筋工称直径和修正值带入
      for (
        let index = 0;
        index < this.formData.checkPointList.length;
        index++
      ) {
        const element = this.formData.checkPointList[index];
        if (
          element.fSecondcheckvalue != "" &&
          element.fSecondcheckvalue != null &&
          element.fFirstcheckvalue != null &&
          element.fFirstcheckvalue != ""
        ) {
          element.fDiameter = this.formData.fDiameter;
          element.fCc = this.formData.fCc;
          //  平均检测值
          if (
            Number(element.fFirstcheckvalue - element.fSecondcheckvalue) > 1 ||
            Number(element.fSecondcheckvalue - element.fFirstcheckvalue) > 1
          ) {
            element.fAvgvalue = "无效";
            element.fSdvalue = "无效";
          } else {
            var Avgvalue;
            Avgvalue =
              (Number(element.fSecondcheckvalue) +
                Number(element.fFirstcheckvalue) +
                2 * Number(element.fCc) -
                2 * Number(this.formData.fCo)) /
              2;

            if (parseInt(Avgvalue) === parseFloat(Avgvalue)) {
              element.fAvgvalue = Avgvalue.toFixed(0);
            } else {
              var arr = Avgvalue.toString().split(".");
              if (arr[1].length > 1) {
                element.fAvgvalue = arr[0] - 0 + 1;
              } else {
                if ((arr[0] - 0) % 2 == 0) {
                  element.fAvgvalue = arr[0] - 0;
                } else {
                  element.fAvgvalue = arr[0] - 0 + 1;
                }
              }
            }

            element.fAvgvalue = element.fAvgvalue + "";
            //偏差值
            element.fSdvalue = Number(element.fAvgvalue - this.formData.fDnd)
              .toFixed(0)
              .toString();
          }
        } else {
          element.fDiameter = "";
          element.fAvgvalue = "";
          element.fSdvalue = "";
          element.fResultdecide = "";
          element.fCc = "";
        }
      }

      this.calculation();
    },
    calculation() {
      let CheckpointcountNum = 0; //  检测点数
      let StandardvaluNum = 0; //合格点数
      let StandardvaluNums = 0; //有效点数
      let StandardvaluNumAllin = 0; //所有合格点数平均值总和
      let fSdvaluNum = 0; //偏差平方总和
      let standard = 0; //标准差
      let Checkpointavgthickness = 0; //保护层厚度平均值
      let features = 0; //保护层厚度特征值

      for (
        let index = 0;
        index < this.formData.checkPointList.length;
        index++
      ) {
        const element = this.formData.checkPointList[index];
        // 检测点数
        if (element.fFirstcheckvalue != "" || element.fSecondcheckvalue != "") {
          CheckpointcountNum++;
          // 判定系数
          if (CheckpointcountNum >= 25) {
            this.formData.fThicknessdecidecoefficient = "1.595";
          } else if (24 >= CheckpointcountNum && CheckpointcountNum >= 16) {
            this.formData.fThicknessdecidecoefficient = "1.645";
          } else if (15 >= CheckpointcountNum && CheckpointcountNum >= 10) {
            this.formData.fThicknessdecidecoefficient = "1.695";
          }
        }

        // 合格点数
        if (
          element.fSdvalue != "无效" &&
          element.fSdvalue != "" &&
          element.fSdvalue != null
        ) {
          var StandardvaluArr = this.formData.fStandardvalue.split(",");
          if (
            Number(StandardvaluArr[0]) <= Number(element.fSdvalue) &&
            Number(element.fSdvalue) <= Number(StandardvaluArr[1])
          ) {
            element.fResultdecide = "合格";
            StandardvaluNum++; //合格点数
          }
        } else {
          if (
            element.fFirstcheckvalue != "" ||
            element.fSecondcheckvalue != ""
          ) {
            element.fResultdecide = "不合格";
          }
        }

        this.formData.fCheckpointcount = CheckpointcountNum.toString(); //检测点数
        this.formData.fCheckpointqualifiedcount = StandardvaluNum.toString(); //合格点数
        //有效点数
        if (
          element.fAvgvalue != "无效" &&
          element.fAvgvalue != "" &&
          element.fAvgvalue != null
        ) {
          StandardvaluNums++; //有效点数
          StandardvaluNumAllin += Number(element.fAvgvalue); //所有有效点数平均值总和
        }
      }

      //保护层厚度平均值
      if (StandardvaluNums == 0) {
        this.formData.fCheckpointavgthickness = "0";
      } else {
        Checkpointavgthickness = (
          StandardvaluNumAllin / StandardvaluNums
        ).toFixed(1);
        this.formData.fCheckpointavgthickness =
          Checkpointavgthickness.toString();
      }
      //  标准差
      if (StandardvaluNums > 1) {
        for (
          let index = 0;
          index < this.formData.checkPointList.length;
          index++
        ) {
          const element = this.formData.checkPointList[index];
          // 标准差分子平方和
          if (
            element.fAvgvalue != "无效" &&
            element.fAvgvalue != "" &&
            element.fAvgvalue != null
          ) {
            fSdvaluNum += Math.pow(
              Number(element.fAvgvalue - Checkpointavgthickness),
              2
            ); //偏差平方总和
          }
        }
        standard = Math.sqrt(fSdvaluNum / (StandardvaluNums - 1)).toFixed(1);
        this.formData.fSd = standard.toString();
      } else {
        this.formData.fSd = "0";
      }
      // 保护层厚度特征值
      if (CheckpointcountNum >= 10) {
        features = (
          Checkpointavgthickness -
          standard * Number(this.formData.fThicknessdecidecoefficient)
        ).toFixed(1);
        this.formData.fDne = features.toString();
      } else {
        this.formData.fDne = "0";
      }

      //保护层厚度特征值与设计值的比值Dne/Dnd
      this.formData.fRatioofdneanddnd = (features / Number(this.formData.fDnd))
        .toFixed(1)
        .toString();

      // 合格率
      if (StandardvaluNum != 0) {
        this.formData.fCheckpointqualifiedrate = (
          (Number(this.formData.fCheckpointqualifiedcount) /
            Number(this.formData.fCheckpointcount)) *
          100
        ).toFixed(1);
      } else {
        this.formData.fCheckpointqualifiedrate = "0";
      }
      console.log(
        5252,
        this.autoSave,
        this.formData,
        this.formData.fModifydate,
        this.formData.fId,
        (this.formData.fModifydate == "" ||
          this.formData.fModifydate == null) &&
          this.formData.fId != ""
      );
      if (
        (this.formData.fModifydate == "" ||
          this.formData.fModifydate == null) &&
        this.formData.fId != ""
      ) {
        if (this.autoSave == 1) {
          this.addModifydate();
        }
      }
    },
    //页面重新计算---保存
    addModifydate() {
      addProtectioncourse(this.formData)
        .then((res) => {
          if (res.errcode == 0) {
            this.loading = false;
            console.log("页面重新计算---保存成功");
            this.edit(1);
          } else {
            console.log("页面重新计算---保存失败");
            this.loading = false;
          }
        })
        .catch(() => {
          console.log("页面重新计算---保存接口失败");
          this.loading = false;
        });
    },
    // 表格是否可填写
    seeNumF() {
      if (
        this.formData.fStandardvalue != null &&
        this.formData.fDiameter != "" &&
        this.formData.fCc != "" &&
        this.formData.fDnd != "" &&
        this.formData.fCo != ""
      ) {
        this.seeNum = false;
      } else {
        this.seeNum = true;
      }
    },

    modelType(e) {
      if (e == "待办") {
        this.getList.modelType = "0";
        this.btnSee = true;
      } else {
        this.btnSee = false;
        this.getList.modelType = "1";
      }
      this.getDataList(this.getList);
    },
    // 获取列表数据
    getDataList(id) {
      this.fId = "";
      this.loading = true;
      getProtectioncoursePageList(id)
        .then((res) => {
          if (res.errcode == 0) {
            var that = this;
            that.loading = false;
            that.tableData = res.data.protectioncourseList.list;
            that.queryCriteriaData = res.data.protectioncourseList;
            that.navigatepageNums =
              that.queryCriteriaData.navigatepageNums.length;
            setTimeout(() => {
              that.$nextTick(() => {
                that.$refs.multipleTableA.doLayout();
              });
            }, 200);
          } else {
            this.$message.error("列表数据", res.msg);
            this.loading = false;
          }
        })
        .catch(() => {
          console.log("列表数据");
          this.loading = false;
        });
    },
    // 判定依据/检测依据
    testBasis(num) {
      getCheckitemsList({
        modelType: num,
      })
        .then((res) => {
          if (res.errcode == 0) {
            if (num == 5) {
              this.TestnoteData = res.data.checkitemsList; //回弹试验依据
            } else if (num == 6) {
              this.JudgetypeData = res.data.checkitemsList; //回弹判定依据
            }
          } else {
            this.$message.error("判定依据/检测依据", res.msg);
          }
        })
        .catch(() => {
          console.log("判定依据/检测依据");
        });
    },
    TestnoteSelectId(item) {
      //试验依据
      this.formData.fCheckreference = item.fItemno;
      this.$refs.fCheckreference.style.border = "none";
      this.$refs.fCheckreference1.style.border = "none";
    },
    JudgetypeSelectId(item) {
      //判定依据
      this.formData.fDecidereference = item.fItemno;
      this.$refs.fDecidereference.style.border = "none";
      this.$refs.fDecidereference1.style.border = "none";
    },

    //选工程划分新增- 列表
    engineering() {
      this.dialogTableVisibleDivide = true;
      this.loadingDialogDivide = true;
      this.fProjectpartid = null;
      this.fDnd = null;
      this.fProjectpart = null;
      //选工程划分新增- 获取列表数据
      getConcreteProjectList({
        companyId: this.userInfo.companyId,
        userId: this.userInfo.userId,
      })
        .then((res) => {
          if (res.errcode == 0) {
            this.loadingDialogDivide = false;
            this.tableData5 = res.data.projectTree;
            console.log("this.tableData5", this.tableData5);
            this.$nextTick(() => {
              var that = this;
              that.$refs.multipleTable.doLayout();
            });
          } else {
            this.$message.error("工程划分新增", res.msg);
            this.loadingDialogDivide = false;
          }
        })
        .catch(() => {
          console.log("工程划分新增");
          this.loadingDialogDivide = false;
        });
    },
    //选工程划分新增- 保存
    submit() {
      if (
        this.fProjectpartid != undefined &&
        this.fDnd != undefined &&
        this.fProjectpart != undefined &&
        this.fProjectpartid != null &&
        this.fDnd != null &&
        this.fProjectpart != null &&
        this.fProjectpartid != "" &&
        this.fDnd != "" &&
        this.fProjectpart != ""
      ) {
        if (this.dialogTableVisible == false) {
          this.edit(0);
        }
        this.dialogTableVisibleDivide = false;

        this.formData.fProjectpartid = this.fProjectpartid;
        this.formData.fStandardvalue = this.fDnd;
        this.formData.fProjectpartandapp = this.fProjectpart;
      } else {
        return this.$message.error("请选择符合标准的数据");
      }
    },
    //选工程划分新增- 点击行
    getRowInfos(e) {
      this.rowD = e;
      this.fProjectpartid = e.f_EnCode;
      this.fDnd = e.f_ProtectionNote;
      this.fProjectpart = e.f_TreeName;
    },
    // 获取当前日期
    getDate() {
      var time = new Date();
      const y = time.getFullYear();

      var m = time.getMonth() + 1 + "";
      m = (m < 10 ? "0" : "") + m;

      var d = time.getDate() + "";
      d = (d < 10 ? "0" : "") + d;

      this.fCheckdates = `${y}-${m}-${d}`;
      this.fReportdates = `${y}-${m}-${d}`;
    },
    // 样品详情弹框
    sampleDetails() {
      if (this.sample == "") {
        this.checkedCities = [];
        this.formDataSample.sampleName = "";
      }
      this.dialogTableVisibleSample = true;
      this.$refs.sample.style.border = "none";
      this.$refs.sample1.style.border = "none";
    },
    handleCheckAllChange(val) {
      this.checkedCities = val ? cityOptions : [];
      this.isIndeterminate = false;
      this.formDataSample.sampleStatus = this.checkedCities;
    },
    //分页
    handleSizeChange(val) {
      return val;
    },
    handleCurrentChange(val) {
      this.getList.page = val;
      this.getDataList(this.getList);
    },
    //分页
    handleCheckedCitiesChange(value) {
      let checkedCount = value.length;
      this.checkAll = checkedCount === this.cities.length;
      this.isIndeterminate =
        checkedCount > 0 && checkedCount < this.cities.length;
      this.formDataSample.sampleStatus = value;
    },

    //样品详情弹框- 保存
    submitFormSample() {
      this.$refs.formDataSample.validate((valid) => {
        if (valid) {
          this.dialogTableVisibleSample = false;
          this.sample =
            "样品名称:" +
            this.formDataSample.sampleName +
            "; " +
            "样品编号:" +
            this.formDataSample.sampleNum +
            "; " +
            "样品状态:" +
            this.formDataSample.sampleStatus +
            "; ";
        } else {
          this.$message.error("请填写必填项");
          return false;
        }
        this.formData.fSampledescription = "";
        for (
          let index = 0;
          index < this.formDataSample.sampleStatus.length;
          index++
        ) {
          const element = this.formDataSample.sampleStatus[index];
          this.formData.fSampledescription =
            this.formData.fSampledescription + element + ";";
        }
      });
    },
    //样品详情弹框 -关闭
    resetFormSample() {
      this.dialogTableVisibleSample = false;
    },

    // 新增/编辑
    edit(num) {
      this.activeIndex = "1";
      if (this.dialogTableVisibleDivide == false) {
        this.fProjectpartid = "";
        this.fDnd = "";
        this.fProjectpart = "";
      }
      this.formDataSample = {
        sampleName: "",
        sampleNum: "",
        sampleStatus: [],
      };
      this.dis = false;
      this.attachmentDetails = [];
      this.fPhotofilelist = [];
      this.sample = "";
      this.recordData = [];
      this.recordData1 = [];
      this.formData = {
        fId: "", //信息表fid     空或不传为新增  有值为修改
        fProjectid: "", //工程id//当前登录人项目id
        fProjectname: "", //工程名称简称//当前登录人项目名
        fProjectfullname: "", //工程全称//当前登录人项目全称
        fChecktype: "", //检测类型
        fCheckcompanyid: "", //检测单位id
        fCheckcompanyname: "", //检测单位简称
        fCheckcompanyfullname: "", //检测单位全称
        fClientid: "", //施工委托单位id//当前登录人机构
        fClientname: "", //施工委托单位简称//当前登录人机构
        fClientfullname: "", //施工委托单位全称//当前登录人机构全称
        fProjectpartid: "", //工程部位id
        fProjectpartandapp: "", //工程部位/用途
        fSamplenumber: "", //样品编号
        fSamplename: "", //样品名称
        fSampledescription: "", //样品描述
        fMajorequipnameandnumber: "", //主要仪器设备名称及编号
        fMajorequipids: "", // 主要仪器设备ids
        fAge: "", //龄期
        fDesignintensity: "", //设计强度等级
        fCheckenvironment: "温度：  ℃ 湿度： %", //试验条件
        fRecordnumber: "", //记录编号
        fCheckdates: "", //试验检测日期
        fCheckreference: "", //检测依据
        fDecidereference: "", //判定依据
        fReportdates: "", //报告日期
        fComponentname: "", //构件名称
        fDnd: "", //保护层厚度设计值
        fCo: "", //垫块厚度Co
        fStandardvalue: "", //规定值或允许偏差
        fThicknessdecidecoefficient: "", //钢筋保护层判定系数
        fDiameter: "", //钢筋公称直径
        fCc: "", //修正值
        fReportnumber: "", //报告编号
        fAddcomments: "", //附加说明
        fCheckresult: "", //检测结论
        fCheckpointcount: "", //保护层厚度检测点数
        fCheckpointqualifiedcount: "", //合格点数
        fCheckpointqualifiedrate: "", //合格率
        fCheckpointavgthickness: "", //保护层厚度平均值
        fSd: "", //标准偏差
        fDne: "", //保护层厚度特征值
        fRatioofdneanddnd: "", //保护层厚度特征值与设计值的比值   DNE/DND
        fCreatedate: "新增",
        fCheckpartimage: "", //检测部位示意图id
        userId: "", //当前登陆用户id
        userName: "", //当前登陆用户名称
        companyId: "", //当前登陆用户机构id
        companyName: "", //当前登陆用户机构名称
        checkPointList: [
          //测点集合
          {
            fCheckpointnumber: "", //测点编号
            fFirstcheckvalue: "", //第一次检测值
            fSecondcheckvalue: "", //第二次检测值
            fAvgvalue: "", //平均值
            fSdvalue: "", //偏差值
            fResultdecide: "", //结果判定
          },
        ],
        recordfiles: [],
        fEquipmentname: [],
        sample: "",
      };

      if (num == 0) {
        if (this.userInfo.companyId != "") {
          // 按检测记录新增
          this.loadingDialog = true;
          this.testType();
          getProtectioncourseRecordNumber({
            companyId: this.userInfo.companyId,
          })
            .then((res) => {
              if (res.errcode == 0) {
                for (
                  let index = 0;
                  index < res.data.checkPointList.length;
                  index++
                ) {
                  const element = res.data.checkPointList[index];
                  if (index < 20) {
                    this.recordData.push(element);
                  } else {
                    this.recordData1.push(element);
                  }
                }
                this.loadingDialog = false;
                this.formData.fSamplenumber = res.data.fSamplenumber;
                this.formData.fRecordnumber = res.data.fRecordnumber;
                this.formData.fReportnumber = res.data.fReportnumber;
                this.formDataSample.sampleNum = res.data.fSamplenumber;
              } else {
                this.$message.error("按检测记录新增", res.msg);
                this.loadingDialog = false;
              }
            })
            .catch(() => {
              console.log("按检测记录新增");
              this.loadingDialog = false;
            });
          this.formData.fProjectid = this.userInfo.projectId;
          this.formData.fProjectname = this.userInfo.projectName;
          this.formData.fProjectfullname = this.userInfo.projectName;

          this.formData.fClientid = this.userInfo.companyId;
          this.formData.fClientname = this.userInfo.companyName;
          this.formData.fClientfullname = this.userInfo.companyFullName;

          this.formData.fCheckdates = this.fCheckdates;
          this.formData.fReportdates = this.fReportdates;

          this.formData.userId = this.userInfo.userId;
          this.formData.userName = this.userInfo.realName;
          this.formData.companyId = this.userInfo.companyId;
          this.formData.companyName = this.userInfo.companyName;

          this.formData.fProjectpartid = this.fProjectpartid;
          this.formData.fStandardvalue = this.fDnd;
          this.formData.fProjectpartandapp = this.fProjectpart;
          this.formData.checkPointList = this.recordData.concat(
            this.recordData1
          );

          this.dialogText = "按检测记录新增";
          this.dialogTableVisible = true;
          this.formData.fCreatedate = "新增";
        } else {
          return this.$message.error("该账号不能新增");
        }
      } else if (num == 1) {
        // 编辑
        if (this.fId != null && this.fId != "") {
          this.autoSave = 1;

          this.dialogText = "编辑";
          this.dialogTableVisible = true;
          this.loadingDialog = true;
          this.recordData = [];
          this.recordData1 = [];

          getProtectioncourseByFid({ fId: this.fId })
            .then((res) => {
              if (res.errcode == 0) {
                var that = this;
                that.loadingDialog = false;
                that.formData = res.data.checkProtectioncourse;
                that.seeNumF();
                // 表格内容
                for (
                  let index = 0;
                  index < that.formData.checkPointList.length;
                  index++
                ) {
                  const element = that.formData.checkPointList[index];
                  if (index < 20) {
                    that.recordData.push(element);
                  } else {
                    that.recordData1.push(element);
                  }
                }
                // 表格内容
                that.timestamp = that.formData.fCheckpartimage;
                that.fPhotofilelist = res.data.checkpartimage;
                that.formData.recordfiles = [];
                // 样品详情
                that.sample =
                  "样品名称:" +
                  that.formData.fSamplename +
                  "; " +
                  "样品编号:" +
                  that.formData.fSamplenumber +
                  "; " +
                  "样品状态:" +
                  that.formData.fSampledescription +
                  "; ";
                that.formDataSample.sampleName = that.formData.fSamplename;
                that.formDataSample.sampleNum = that.formData.fSamplenumber;
                that.formDataSample.sampleStatus =
                  that.formData.fSampledescription;
                var arr = that.formDataSample.sampleStatus.split(";");
                that.checkedCities = arr.slice(0, arr.length - 1);
                // 样品详情

                // 主要仪器设备名称及编号
                that.fEquipmentname = [];

                if (this.fMajorequipids != null) {
                  for (let index = 0; index < that.tableData1.length; index++) {
                    const element = that.tableData1[index];
                    let fMajorequipids = [];
                    fMajorequipids = that.formData.fMajorequipids.split(",");
                    for (
                      let index = 0;
                      index < fMajorequipids.length;
                      index++
                    ) {
                      const element2 = fMajorequipids[index];
                      if (element.fId == element2) {
                        that.fEquipmentname.push(element);
                      }
                    }
                  }
                } else {
                  that.fEquipmentname =
                    that.formData.fMajorequipnameandnumber.split(",");
                  that.fEquipmentname;
                }

                // 主要仪器设备名称及编号

                //调计算
                if (
                  that.formData.fDiameter != "" &&
                  that.formData.fCc != "" &&
                  that.formData.fDnd != "" &&
                  that.formData.fCo != "" &&
                  that.formData.fStandardvalue != "" &&
                  that.formData.fDiameter != null &&
                  that.formData.fCc != null &&
                  that.formData.fDnd != null &&
                  that.formData.fCo != null &&
                  that.formData.fStandardvalue != null
                ) {
                  that.inputCheckpointnumber();
                } else {
                  console.log("值不全，无法自动计算");
                }
              } else {
                this.$message.error("编辑", res.msg);
                this.loadingDialog = false;
              }
            })
            .catch(() => {
              console.log("编辑失败");
              this.loadingDialog = false;
            });
        } else {
          return this.$message.error("请先选择需要编辑的数据");
        }
      }
    },
    // 保存
    submitForm() {
      // 必填项
      this.formData.fEquipmentname = this.fEquipmentname;
      console.log(7878, this.formData.fEquipmentname);
      this.formData.sample = this.sample;
      var textData = [
        "fChecktype",
        "fProjectpartandapp",
        "sample",
        "fCheckenvironment",
        "fCheckreference",
        "fDecidereference",
        "fEquipmentname",
        "fDiameter",
        "fCc",
        "fComponentname",
        "fDnd",
        "fCo",
        "fAge",
        "fDesignintensity",
        "fCheckresult",
      ];

      var newData = [];
      textData.map((item) => {
        if (this.formData[item] == "") {
          newData.push(item);
        } else {
          // console.log('非空',item,this.formData[item]);
        }
      });

      newData.map((item) => {
        if (item == "fProjectpartandapp") {
          newData.push("fProjectpartandapp1");
        } else if (item == "sample") {
          newData.push("sample1");
        } else if (item == "fCheckreference") {
          newData.push("fCheckreference1");
        } else if (item == "fDecidereference") {
          newData.push("fDecidereference1");
        } else if (item == "fEquipmentname") {
          newData.push("fEquipmentname1");
        } else if (item == "fComponentname") {
          newData.push("fComponentname1");
        } else if (item == "fDnd") {
          newData.push("fDnd1");
        } else if (item == "fCo") {
          newData.push("fCo1");
        }
      });

      if (newData.length > 0) {
        this.$message.error("请填写必填项");
        newData.map((item) => {
          this.$refs[item].style.border = "1px solid red";
        });
      } else {
        // 样品详情
        this.formData.fSamplename = this.formDataSample.sampleName;
        this.formData.fCompanyid = this.userInfo.companyId;
        this.loading = true;
        if (this.formData.fCheckpartimage == "") {
          this.timestamp = "GJ" + Date.parse(new Date());
          this.formData.fCheckpartimage = this.timestamp;
        }
        this.formData.fCreatedate = null;
        addProtectioncourse(this.formData)
          .then((res) => {
            if (res.errcode == 0) {
              this.loading = false;
              this.reload();
              this.$message.success("新增成功");
            } else {
              this.$message.error("新增失败", res.msg);
              this.loading = false;
            }
          })
          .catch(() => {
            console.log("新增失败");
            this.loading = false;
          });
      }
    },
    handleSelect(key) {
      this.activeIndex = key;
    },
    // 工程部位/用途
    changeProject() {
      this.engineering();
      this.inputCheckpointnumber();
      this.$refs.fProjectpartandapp.style.border = "none";
      this.$refs.fProjectpartandapp1.style.border = "none";
    },
    // 测试主要设备及编号
    selectEquipmen() {
      let Majorequipnameandnumber = "";
      let Majorequipids = "";
      for (let index = 0; index < this.fEquipmentname.length; index++) {
        const element = this.fEquipmentname[index];
        Majorequipnameandnumber =
          Majorequipnameandnumber +
          element.fEqptname +
          "/" +
          element.fEqptno +
          ",";
        Majorequipids = Majorequipids + element.fId + ",";
      }
      this.formData.fMajorequipnameandnumber =
        Majorequipnameandnumber.substring(
          0,
          Majorequipnameandnumber.length - 1
        );
      this.formData.fMajorequipids = Majorequipids.substring(
        0,
        Majorequipids.length - 1
      );
      this.$refs.fEquipmentname.style.border = "none";
      this.$refs.fEquipmentname1.style.border = "none";
      console.log(
        3312,
        this.formData.fCreatedate,
        this.formData.fMajorequipids
      );
    },
    // 主要仪器设备名称及编号
    getEquipment() {
      this.getList.fUserid = this.userInfo.userId;
      this.getList.fCompanyid = this.userInfo.companyId;
      getMangEquipmentList({
        fCompanyid: this.getList.fCompanyid, //当前登录用户机构id
        keyType: "钢筋保护层厚度检测设备",
      })
        .then((res) => {
          if (res.errcode == 0) {
            var that = this;
            that.tableData1 = res.data.mangEquipmentList;
          } else {
            this.$message.error("主要仪器设备名称及编号", res.msg);
            return false;
          }
        })
        .catch(() => {
          console.log("主要仪器设备名称及编号");
          return false;
        });
    },
    // 检测类型
    testType() {
      getCheckTypeByUserId({ companyId: this.userInfo.companyId })
        .then((res) => {
          if (res.errcode == 0) {
            this.Checktype = res.data.Checktype;
          } else {
            this.$message.error("检测类型", res.msg);
          }
        })
        .catch(() => {
          console.log("检测类型失败");
        });
    },
    changeChecktype(e, item) {
      for (let index = 0; index < this.Checktype.length; index++) {
        const element = this.Checktype[index];
        if (element.fItemName == e) {
          this.formData.fCheckcompanyfullname = element.fCompanyFullName;
          this.formData.fCheckcompanyid = element.fCompanyId;
          this.formData.fCheckcompanyname = element.fCompanyName;
        }
      }

      this.$refs[item].style.border = "none";
    },
    // 必填框红后 有值框回原色

    // 钢筋工称直径
    DiameterText(text) {
      this.seeNumF();
      this.inputCheckpointnumber();
      this.$refs[text].style.border = "none";
    },
    // 修正值：
    CcText(text) {
      this.seeNumF();
      this.inputCheckpointnumber();
      this.$refs[text].style.border = "none";
    },
    // 构件名称
    Componentname() {
      this.$refs.fComponentname.style.border = "none";
      this.$refs.fComponentname1.style.border = "none";
    },
    //  垫板厚度
    CoText() {
      this.seeNumF();
      this.inputCheckpointnumber();
      this.$refs.fCo.style.border = "none";
      this.$refs.fCo1.style.border = "none";
    },
    // 钢筋保护层厚度设计值Dnd
    StandardvalueText() {
      this.seeNumF();
      this.inputCheckpointnumber();
      this.$refs.fDnd.style.border = "none";
      this.$refs.fDnd1.style.border = "none";
    },
    // 龄期
    Age(text) {
      this.$refs[text].style.border = "none";
    },
    //  设计强度等级
    Designintensity(text) {
      this.$refs[text].style.border = "none";
    },

    // 检测结论
    CheckresultText(f) {
      this.fCheckresultList = [];

      if (
        this.formData.fCheckpointqualifiedrate != "" &&
        this.formData.fRatioofdneanddnd != ""
      ) {
        var num = Number(this.formData.fRatioofdneanddnd);
        var evaluate = "";
        var result = "";
        if (num > 0.95) {
          evaluate = "1";
          result = "影响不显著";
        } else if (num > 0.85 && num <= 0.95) {
          evaluate = "2";
          result = "有轻度影响";
        } else if (num > 0.7 && num <= 0.85) {
          evaluate = "3";
          result = "有影响";
        } else if (num > 0.55 && num <= 0.7) {
          evaluate = "4";
          result = "有较大影响";
        } else if (num <= 0.55) {
          evaluate = "5";
          result = "钢筋易失去碱性保护，发生绣蚀";
        }

        var text =
          "检测钢筋保护层厚度合格率为" +
          this.formData.fCheckpointqualifiedrate +
          "%,钢筋保护层厚度特征值与设计值的比值Dne/Dnd为" +
          this.formData.fRatioofdneanddnd +
          ",对结构钢筋耐久性" +
          result +
          ",评定标度为" +
          evaluate +
          "。";
        var text2 = "经检验,该检测结果符合（判定依据）技术要求。";
        this.fCheckresultList = [text, text2];
      } else {
        return this.$message.error(
          "钢筋保护层厚度合格率不能为空，钢筋保护层厚度特征值与设计值的比值不能为空"
        );
      }
      this.$refs[f].style.border = "none";
    },

    // 提交
    SubmitText(id) {
      if (id != "" && id != null) {
        this.$confirm("是否继续提交?", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        })
          .then(() => {
            this.loading = true;
            submitProtectioncourse({
              fId: id,
              userId: this.userInfo.userId,
              userName: this.userInfo.realName,
            })
              .then((res) => {
                if (res.errcode == 0) {
                  this.loading = false;
                  this.reload();
                  this.$message.success("提交成功");
                } else {
                  this.$message.error("提交失败", res.msg);
                  this.loading = false;
                  return false;
                }
              })
              .catch(() => {
                console.log("提交失败");
                this.loading = false;
                return false;
              });
          })
          .catch(() => {
            this.$message("取消提交");
          });
      } else {
        return this.$message.error("请先选择需要提交的数据");
      }
    },
    // 删除
    rowDelete(id) {
      if (id != "" && id != null) {
        this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        })
          .then(() => {
            this.loading = true;
            deleteProtectioncourse({ fId: id })
              .then((res) => {
                if (res.errcode == 0) {
                  this.loading = false;
                  this.reload();
                  this.$message.success("删除成功");
                } else {
                  this.$message.error("删除失败", res.msg);
                  this.loading = false;
                  return false;
                }
              })
              .catch(() => {
                console.log("删除失败");
                this.loading = false;
              });
          })
          .catch(() => {
            this.$message("取消删除");
          });
      } else {
        return this.$message.error("请先选择需要删除的数据");
      }
    },
    // 关闭
    resetForm() {
      this.dialogTableVisible = false;
      this.dialogTableVisibleSee = false;
      this.dialogTableVisibleDivide = false;
      this.dialogTableVisibleJl = false;
      this.dialogTableVisibleBg = false;
      this.reload();
    },

    // 点击当前行
    getRowInfo(e) {
      this.row = e;
      this.fId = e.fId;
    },
    // 点击行信息表/报告表
    openDialog(row) {
      this.activeIndex = "1";
      this.fId = row.fId;
      if (this.fId != null && this.fId != "") {
        this.recordData = [];
        this.recordData1 = [];

        this.dis = true;
        this.dialogTableVisibleSee = true;
        this.loadingDialogSee = true;

        getProtectioncourseByFid({ fId: this.fId })
          .then((res) => {
            if (res.errcode == 0) {
              var that = this;
              that.loadingDialogSee = false;
              that.formData = res.data.checkProtectioncourse;
              that.timestamp = that.formData.fCheckpartimage;
              that.fPhotofilelist = res.data.checkpartimage;
              that.formData.recordfiles = [];
              for (
                let index = 0;
                index < that.formData.checkPointList.length;
                index++
              ) {
                const element = that.formData.checkPointList[index];
                if (index < 20) {
                  that.recordData.push(element);
                } else {
                  that.recordData1.push(element);
                }
              }
              that.sample =
                "样品名称:" +
                that.formData.fSamplename +
                "; " +
                "样品编号:" +
                that.formData.fSamplenumber +
                "; " +
                "样品状态:" +
                that.formData.fSampledescription +
                "; ";

              //调计算
              if (
                that.formData.fDiameter != "" &&
                that.formData.fCc != "" &&
                that.formData.fDnd != "" &&
                that.formData.fCo != "" &&
                that.formData.fStandardvalue != "" &&
                that.formData.fDiameter != null &&
                that.formData.fCc != null &&
                that.formData.fDnd != null &&
                that.formData.fCo != null &&
                that.formData.fStandardvalue != null
              ) {
                that.inputCheckpointnumber();
              } else {
                console.log("值不全，无法自动计算");
              }
            } else {
              this.$message.error("信息表/报告表", res.msg);
              this.loadingDialogSee = false;
            }
          })
          .catch(() => {
            console.log("获取信息表/报告表数据失败");
            this.loadingDialogSee = false;
            return false;
          });
      } else {
        return this.$message.error("请先选择需查看的数据");
      }
    },

    // 点击当前行变色
    rowChange(val) {
      this.currentRow = val;
    },

    // 获取页面容器高度
    getHeight() {
      var h = document.documentElement.clientHeight; //获取页面可见高度
      // var w = document.documentElement.clientWidth; //获取页面可见高度
      this.dialogHeight = h * 0.5 + "px";
      this.dialogHeights = h * 0.88 + "px";
      this.dialogHeightSample = h * 0.4 + "px";
    },
  },
};
</script>

<style scoped>
.printTables {
  background: #fff;
  display: flex;
  justify-content: end;
  padding: 5px;
  margin-top: 10px;
}

.dialogBody {
  padding: 3px 20px;
  height: 80%;
  overflow-y: auto;
}

.pageFlagText {
  color: #171a1d;
  font-size: 16px;
}

a {
  text-decoration: none;
  color: #000;
}
</style>
